How do I see the logs of rust-analyzer? I want rust-analyzer to write log to my specified file.
Rust analyzer logs to stderr
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?
Nope, logging destination is not configurable. It's the job of the client to redirect logs to the appropriate location
Which client are you using?
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.
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
Ok. I will then create a wrapper. Thanks for your help.
you could just save the stderr buffer to a file?
oh, matklad proposed that already