-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Fix and improve server logging #2492
Comments
Sigma IDE uses a contra variant logger with support for tracing. It has the usual backends (console, event log) as well as an LSP backend. Contra variant has these USPs:
|
Wow that sounds cool, any chance to use it in hls? i mean the source code is available to be copied or used via a public library |
This idea is implemented by logging libraries like
The only slightly tricky bit is the LSP backend, which involves registering a plugin to capture the LSPEnv in order to send Proving invariants in tests can be done by either parsing the LSP notifications sent by the LSP logger backend, or by creating new logger backends on the fly that do more complicated things |
Why do you need a |
Also I'm very pro this, it would be very helpful. The other component is just logging more. For example, we don't give users any logging about why we pick certain cradles, which is one of the things that we often end up helping people debug. |
yep, this is a implicit-hie thing, which has not log output at all afaik :-( |
I might make a gentle attempt to use |
One of the aspects of server logging which could be improved is the log of lsp messages, see #1904 |
Adding some TODOS for after #2558 lands (cc @eddiemundo )
|
More TODOs that #2558 didn't complete
|
I'm not sure how I feel about this. It depends on whether we want to do much in the way of "local" logging control. For example, if we wanted to have the ability to turn off plugin logs or something,, we'd want to make sure they were being passed the logger that we had modified, not taking one from the global environment. |
Nice that's another disadvantage. It's just an idea that Pepe asked if I thought about that I reflexively didn't like, but couldn't really articulate why beyond it being uglier. I'll edit the comment. |
The recorder should be an input to defaultMain and therefore under your full control, regardless of whether it is stored in ShakeExtras or not. My suggestion was to add a field argsRecorder to the Arguments value taken by defaultMain, iirc, not to add it to ShakeExtras. Or maybe I suggested both? |
You're right my brain failed and now I see my reply makes no sense. My train of thought was previous logger in Arguments goes into ShakeExtras, therefore adding recorder to Arguments is for going into ShakeExtras. |
A few more:
|
With #2750 we can send messages to window by setting priority of message to Maybe setting message to Error isn't appropriate for all like |
As a side question, is there a place where the new loggers get their format string? There seem to be four formats*:
I was thinking about adding the thread id to debug one issue but could not find where the new structured logs are formatted with time, level and stuff. 😕 *) Funny that each time format is different too, with the first two ignoring time zones I guess? |
I believe the first one is the old legacy logging format. Otherwise, checkout |
Here's another thought:
|
Yeah, there's still a mess here:
I think this shouldn't be too bad? It could be another field in our message type, of type |
As @alanz suggested in this issue about harmonising logging :
I would add:
The text was updated successfully, but these errors were encountered: