-
Notifications
You must be signed in to change notification settings - Fork 96
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
Improve logging in the alarm_logger #2083
Conversation
split alarm_logger.properties in two files, one for spring boot and one for phoebus use alarm_logger_logging.properties as default for logging remove unused settings from properties files
The REST api is a place holder so I think we want to keep it. |
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.
My only comment would be that logging should maybe be a discussion topic for the entire code base. In the Phoebus application I think we at this point are consistently using the "native" java.util.logging
API. Maybe we should consider using the same strategy for services to make things a bit more consistent and life easier for developers. Not sure how such a strategy works for Spring-based services, but I would be prepared to investigate in the context of the save-and-restore service.
Thank you for the quick answers. |
I'm a bit on thin ice here, but your change to redirect to JUL is maybe all we need. I'm fine approving this. |
I am new to this process, so is there anything I still need to do to have this merged? I think the PR is still missing formal approval, however, I don't see anything I could do. |
@mgotz, can you update this PR with latest changes on the main branch? Seems we both have removed duplicates in pom files. |
Sure, I merged the master back in. |
In configuring the alarm-logger at our site I stumbled a few times with getting logging configured the desired way, the amount of error and warning log messages, despite seemingly correct configuration, and non-working options in the alarm_logger.properties file.
This pull request tries to address these problems I had in the hope future users might have an easier start:
@PropertySource
. This is necessary for the logging and the banner=off settings to have any effect. Those settings can't be changed at runtime.-properties
. Now the alarm_logger.properties can be used as a template for providing your own file with the-properties
argument and all settings therein should have an effect.While stomping out error message I came accross the SearchController in the rest directory. It attempts to load preferences from alarm_logging_service.properties, which doesn't exist, creating an error message. The SearchController seems to wrap the elastic search REST API in its own REST API. I don't think it is used anywhere in Phoebus. Could it simply be removed?