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

How to logging to a file #2658

Open
bodnarlajos opened this issue Feb 5, 2025 · 1 comment
Open

How to logging to a file #2658

bodnarlajos opened this issue Feb 5, 2025 · 1 comment

Comments

@bodnarlajos
Copy link

bodnarlajos commented Feb 5, 2025

Hi,
The link to Slack is wrong on the "readme" page.

I would like to use omnisharp with emacs + tramp + eglot.
When I use the same Omnisharp version with emacs + eglot on my local system everything is working well.
I think the environment is different with tramp (ssh connection to the server).
I would like to see what is the problem but I can't see the stdout / stderr or maybe there is nothing on these channels ...
I was seeing that the OmniSharp is started because I saw the processes but there is no answer for the first jsonrpc message. The first message is ~same on localhost and the "ssh/tramp" connection ...
Except that the message contains the "processId:null" what can be problem ... ?
When I start the OmniSharp (without -lsp) from command line on the server then everthing seems good.

My plan is to write the log from OmniSharp to a file to see what is the problem.
Is there any configuration how I can do this ?

Thanks in advance!

@bodnarlajos
Copy link
Author

I use a script below and it logging the input / output stream to a file.

`
#!/bin/bash

Define log files

LOG_FILE="/tmp/omnisharp_lsp.log"

Log input and output while passing to the LSP binary

exec > >(tee -a "$LOG_FILE") 2> >(tee -a "$LOG_FILE" >&2)

Start the LSP server binary with arguments

~/Projects/OmniSharp/OmniSharp -lsp --loglevel Debug "$@"
`

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

No branches or pull requests

1 participant