Skip to content

Unified logging setup for Swift extension #1746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 31, 2025
Merged

Conversation

award999
Copy link
Contributor

@award999 award999 commented Jul 25, 2025

Description

  • Add winston dependency that will log to a file always, and to the Swift output channel at the level specified by the new swift.outputChannelLevel setting
  • Deprecate the swift.diagnostics setting but check it to set the output channel to debug if the swift.outputChannelLevel setting is not explicitly set
  • No longer use RollingLog to hold log messages in memory unless running the extension under tests
  • Modify SwiftOutputChannel used by the LSP to extend this new login functionality, but allow it to be treated like an output channel

Issue: #1755

Tasks

  • Required tests have been written
  • Documentation has been updated
  • Added an entry to CHANGELOG.md if applicable

@award999 award999 changed the title [DRAFT] Logging Setup [DRAFT] Unified logging setup for Swift extension Jul 25, 2025
@award999 award999 changed the title [DRAFT] Unified logging setup for Swift extension Unified logging setup for Swift extension Jul 29, 2025
@award999 award999 marked this pull request as ready for review July 29, 2025 13:52
Copy link
Contributor

@rbenegal rbenegal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me thanks! Just some minor typo suggestions.

Copy link
Member

@matthewbastien matthewbastien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! This will help a lot with our logging.

Just one minor comment about the name of the setting.

@swiftlang swiftlang deleted a comment from matthewbastien Jul 31, 2025
@award999 award999 merged commit 7acabf0 into swiftlang:main Jul 31, 2025
35 of 36 checks passed
@award999 award999 deleted the logging branch July 31, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants