Skip to content
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

Reduce verbosity of log levels #203

Closed
guusdk opened this issue Nov 17, 2024 · 0 comments
Closed

Reduce verbosity of log levels #203

guusdk opened this issue Nov 17, 2024 · 0 comments

Comments

@guusdk
Copy link
Member

guusdk commented Nov 17, 2024

Some unexpected situations are logged very verbosely. The conversion of a Session into an entity, for example, will log an error like this:

2024-11-15 10:36:36.910 ERROR [Jetty-QTP-AdminConsole-19336]: org.jivesoftware.openfire.plugin.rest.controller.SessionController - UnknownHostException
java.net.UnknownHostException: null
        at org.jivesoftware.openfire.nio.NIOConnection.getHostAddress(NIOConnection.java:159) ~[xmppserver-4.7.5.jar:4.7.5]
        at org.jivesoftware.openfire.session.LocalSession.getHostAddress(LocalSession.java:518) ~[xmppserver-4.7.5.jar:4.7.5]
        at org.jivesoftware.openfire.plugin.rest.controller.SessionController.convertToSessionEntities(SessionController.java:167) ~[?:?]
        at org.jivesoftware.openfire.plugin.rest.controller.SessionController.getAllSessions(SessionController.java:82) ~[?:?]
        at org.jivesoftware.openfire.plugin.rest.service.SessionService.getAllSessions(SessionService.java:53) ~[?:?]

Although (somewhat) unexpected, this is hardly an error. At the very least, it's not an error in the REST API, and it's not something that a consumer of the REST API can have an influence over.

Logging events like this needlessly pollutes log files. The log level should be reduced.

guusdk added a commit to guusdk/openfire-restAPI-plugin that referenced this issue Nov 17, 2024
This should clean up logs from messages that can't be acted on by the user anyway.

Some logged events now have improved descriptions.
@guusdk guusdk closed this as completed in 9e898c2 Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant