You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to leave the logging level of the server on INFO. However having an entry for server stats every hour is a little too much noise. So for "server stats" I want to set the level to WARN. The log-level-overrides entry should be this, but doing so causes the server load to fail:
"message=Server stats -> warn"
In digging through the code I found the following regex in ntfy/cmd/app.go, line 31:
You as the authors of the code may have done this on purpose because multiple words (and the whitespace that comes with them) could break search logic deeper in the code. Is this a bug or a choice?
The text was updated successfully, but these errors were encountered:
This issue is even worse in the default configuration, where the long line of statistics is printed to the log every minute.
While the server stats log messages cannot be filtered, an other option is to set the manager-interval config value.
The docs say this about it:
Interval in which the manager prunes old messages, deletes topics and prints the stats.
The default value of it is 1 minute, but if you increase it to an hour or a day, it might be less of a problem.
Actually, for me filtering the messages would have been the workaround, this (less frequent stats logging) is the solution I was looking for.
If you make use of this, don't forget that this also affects the execution of cleanup operations.
I would like to leave the logging level of the server on INFO. However having an entry for server stats every hour is a little too much noise. So for "server stats" I want to set the level to WARN. The log-level-overrides entry should be this, but doing so causes the server load to fail:
"message=Server stats -> warn"
In digging through the code I found the following regex in ntfy/cmd/app.go, line 31:
(?i)^([^=\s]+)(?:\s*=\s*(\S+))?\s*->\s*(TRACE|DEBUG|INFO|WARN|ERROR)$
The culprit is "\S+". Changing the regex to this works, if this is a bug:
(?i)^([^=\s]+)(?:\s*=\s*(.+))?\s*->\s*(TRACE|DEBUG|INFO|WARN|ERROR)$
You as the authors of the code may have done this on purpose because multiple words (and the whitespace that comes with them) could break search logic deeper in the code. Is this a bug or a choice?
The text was updated successfully, but these errors were encountered: