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

When the log level is error, normal messages cannot be output #1965

Closed
xiyaowong opened this issue May 15, 2024 · 3 comments · Fixed by #2022
Closed

When the log level is error, normal messages cannot be output #1965

xiyaowong opened this issue May 15, 2024 · 3 comments · Fixed by #2022
Labels
bug Something isn't working manager: messages messages and status line

Comments

@xiyaowong
Copy link
Collaborator

xiyaowong commented May 15, 2024

image

  1. Set output channel level to error
  2. Run lua print('a\nb')

This is not a log, so log levels should not affect it.

Messages should use an independent output channel

public constructor(readonly channel: LogOutputChannel) {

And it should be OutputChannel, not LogOutputChannel

@xiyaowong xiyaowong changed the title When the output channel's log level is set to 'error', normal messages cannot be output When the log level is error, normal messages cannot be output May 15, 2024
@xiyaowong xiyaowong added the manager: messages messages and status line label May 15, 2024
@justinmk justinmk added the bug Something isn't working label May 15, 2024
@justinmk
Copy link
Collaborator

I think we can handle this without an extra channel.

And it should be OutputChannel, not LogOutputChannel

Why? The timestamps and highlighting can be useful.

@xiyaowong
Copy link
Collaborator Author

The output is closer to neovim and is not a log in nature. In addition, there are problems with the current message output. Particularly long content is sometimes missing.

@ollien
Copy link
Collaborator

ollien commented May 27, 2024

For normal msg_show events (e.g. pressing "u" and getting "Already at oldest change"), we already have those in the status bar, so it not being in the log makes sense to me. The only one that's different is show_msg_history, which needs somewhere to go. IMO, that is justification to have a separate output channel for logs (the alternative of creating a new temporary buffer seems worse)

My proposal is we create two output channels, one titled "vscode-neovim logs" and another titled "vscode-neovim", the latter of which is a plain output channel (that we could perhaps adorn with a timestamp). (not sold on these names specifically)

P.S, heh, so this is amusing. You can actually create two output channels with the same name, and they'll both display in the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working manager: messages messages and status line
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants