fabric8-analytics / fabric8-analytics-lsp-server

Apache License 2.0
9 stars 33 forks source link

Add logging #3

Open msrb opened 7 years ago

msrb commented 7 years ago

LSP agent in Che doesn't listen on server's stderr, so logs printed there don't show anywhere. The viable option could be sending them to a file.

Note there already is some very basic file logging, but the file is nowhere to be found in Che workspace. I guess the current working directory is not writeable for the server (use $HOME maybe?).

invincibleJai commented 7 years ago

@msrb log file bayesian.log is created in current working directory (i.e. /projects/ for Che workspaces) , have tested with https://github.com/fabric8-analytics/fabric8-analytics-lsp-server/pull/9 it'll be created in (/home/user/che/ls-bayesian) for Che workspaces

screen shot 2017-06-07 at 10 57 57 am
samuzzal-choudhury commented 7 years ago

@invincibleJai this sounds good to me as Mario pointed out that the log location /home/user/che/ is going to be in accordance with other agents.

@msrb I think this issue can be used for working on redirecting server's stderr to the log file. Please correct me if you think otherwise.

jeffmaury commented 5 years ago

Would be fine if we can tune the log level through another env var. Also note the log file is an absolute UNIX file path that causes isssues while debugging on Windows