Skip to content
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

fix: redirect logger to stderr #208

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

fhunleth
Copy link
Contributor

This makes error logs show up in VSCode's error window without
interfering with communication over stdout.

This makes error logs show up in VSCode's error window without
interfering with communication over stdout.
@mhanberg mhanberg changed the title Redirect log messages to stderr fix: redirect logger to stderr Aug 28, 2023
@@ -2,4 +2,6 @@ import Config

config :next_ls, :indexing_timeout, 100

config :logger, :default_handler, config: [type: :standard_error]
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you point me to the docs on this config option? I can't seem to find it in the OTP docs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To start, skim down to the :default_handler configuration at https://hexdocs.pm/logger/Logger.html#module-boot-configuration. Then go to https://www.erlang.org/doc/man/logger_std_h.html for the options. :type is the first one.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome, thanks!

@mhanberg mhanberg merged commit c3ab60f into elixir-tools:main Aug 28, 2023
3 checks passed
@fhunleth fhunleth deleted the redirect-logger-to-stderr branch August 28, 2023 18:52
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.

None yet

2 participants