-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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: propagate log-config changes #12566
fix: propagate log-config changes #12566
Conversation
f8c598f
to
4879567
Compare
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.
Alright, looks good to me 👍
0abdec7
to
d469f92
Compare
I noticed that the frontend loggers were correctly updated with the PR, however the backend loggers were not. I reworked the PR a bit for a cleaner architecture including getting rid of a pre-existing |
@msujew Ping? :-) |
d469f92
to
8ed7854
Compare
Rebased the PR on the latest state of |
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.
Alright the new changes look good to me as well 👍
If Theia is started with the "--log-config" option the 'LogLevelCliContribution' watches for file changes and fires a 'logConfigChangedEvent'. This event was not listened to. Therefore already existing 'ILogger' levels were not updated. This is now fixed by notifying loggers about log config changes to update their log level. Also refactors the backend architecture to also use the existing client mechanism for notifications. Signed-off-by: Stefan Dirix <sdirix@eclipsesource.com> Contributed on behalf of STMicroelectronics
8ed7854
to
8f1ae28
Compare
If Theia is started with the "--log-config" option the 'LogLevelCliContribution' watches for file changes and fires a 'logConfigChangedEvent'. This event was not listened to. Therefore already existing 'ILogger' levels were not updated. This is now fixed.
Contributed on behalf of STMicroelectronics
What it does
Installs a listener in the
console-logger-server
to update log levels when the log config file changesHow to test
Create a log config file and start Theia with the
--log-config
option, e.g.theia start --log-config=logConfig.json
.Example log config:
While Theia is running modify the handed over log config file (e.g. change the
defaultLevel
towarn
orfatal
) and observe that from then on the log messages are filtered accordingly.Review checklist
Reminder for reviewers