-
-
Notifications
You must be signed in to change notification settings - Fork 66
fix: properly log when engine fails to initialize #244
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
base: main
Are you sure you want to change the base?
Conversation
d6c6ff4 to
c93445d
Compare
c93445d to
3672c0b
Compare
3672c0b to
4e099f7
Compare
It can take many seconds until the engine is available, hence editors might time out the initialization. We still at least send an error $window/logMessage with the initialization error when it happens.
ff0aed9 to
dc9c8f1
Compare
| end | ||
|
|
||
| def on_exit_status(%__MODULE__{} = state, exit_status) do | ||
| Logger.debug( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead, lets put an info log in the 0 clause of the case, saying the engine shutdown
then in the error clause, put an error log saying it shutdown unexpectedly
- Also show errors in the client via window/showMessage - Improve logging cases - Only register with nodemapper when node started ok - For now do not introduce full expert test
3a79611 to
318d0d6
Compare
Now we start manually all application children instead of ensuring the application has started
318d0d6 to
e381804
Compare
21a1b68 to
d168107
Compare
|
|
||
| _error_status -> | ||
| Logger.error( | ||
| "Engine shut down unexpectedly, node exited with status #{exit_status}). Last message: #{state.last_message}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the root_uri here as well and any other log about the engine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the project as a prefix but I'm not sure that's desired in the current incarnation. Let me know if this message format looks good to you.
415c190 to
5ae550e
Compare
|
Let me know if there are any pending issues to be addressed. |
Previously whenever there was some error initializing the project node a few things would happen:
expert.logNow:
This PR is motivated as an attempt to mitigate one of the many situations where expert fails silently, e.g.: #241
Remarks
didChangeConfigurationsince it was noop