Stream: t-compiler/wg-rls-2.0

Topic: rust analyzer logs


B YI (Mar 06 2020 at 11:17, on Zulip):

How do I see the logs of rust-analyzer? I want rust-analyzer to write log to my specified file.

matklad (Mar 06 2020 at 12:06, on Zulip):

Rust analyzer logs to stderr

B YI (Mar 06 2020 at 12:21, on Zulip):

Thanks. The thing is rust-analyzer is started by the lsp client. I have to create a wrapper to view stderr of rust analyzer. Does rust-analyzer has some command line flag to specify the log file?

matklad (Mar 06 2020 at 12:23, on Zulip):

Nope, logging destination is not configurable. It's the job of the client to redirect logs to the appropriate location

matklad (Mar 06 2020 at 12:23, on Zulip):

Which client are you using?

B YI (Mar 06 2020 at 12:25, on Zulip):

lsp-mode. It has a variable lsp-log-io to log all the requests. But viewing it within emacs is kind of awkward for me.

matklad (Mar 06 2020 at 12:27, on Zulip):

Yeah, I think the best way would be to either use that Emacs log (I think it might be possible to save it to a file?) or to start rust-analyzer via tee

B YI (Mar 06 2020 at 12:28, on Zulip):

Ok. I will then create a wrapper. Thanks for your help.

Florian Diebold (Mar 06 2020 at 15:16, on Zulip):

you could just save the stderr buffer to a file?

Florian Diebold (Mar 06 2020 at 15:16, on Zulip):

oh, matklad proposed that already

Last update: Sep 22 2020 at 02:15UTC