Re: [PR] Issue 1501: increase default StatusLogger level to warn (logging-log4j2)
vy commented on PR #1592: URL: https://github.com/apache/logging-log4j2/pull/1592#issuecomment-1904116163 @lukaszspyra, I am sorry for the delay. There were more pressing issues. As a part of our ongoing effort to clean up the `log4j-api` in `2.x`, we are re-visiting the idea of decreasing the default `StatusLogger` level from `ERROR` to `WARN`. PMC is mostly concerned about the noise this will create for existing users. Once the default level is set to `WARN`, some warnings will start getting displayed on unrecognized/ignored properties. This is good. OTOH, there will also appear some not much useful warnings, e.g., `The bufferSize is set to ... but bufferedIo is false`. **Would you be interested in fixing these (e.g., lowering the level of such messages to `INFO` or conditionally enabling them)** and adding that your PR? I believe we (@ppkarwasz?) can provide assistance for such an effort. PMC needs to be convinced anyway. But if their _"logging noise"_ concerns are addressed, I don't expect a blocker from that direction. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Issue 1501: increase default StatusLogger level to warn (logging-log4j2)
ppkarwasz commented on PR #1592: URL: https://github.com/apache/logging-log4j2/pull/1592#issuecomment-1903912059 @lukaszspyra, Sorry for the delayed answer. Your PR looks good to me, if the default status logger level of `ERROR` can not be changed. Personally I don't agree that `WARN` messages should be hidden by default and I prefer your original version, but there is no consensus on this matter in the PMC. @vy what do you think? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Issue 1501: increase default StatusLogger level to warn (logging-log4j2)
lukaszspyra commented on PR #1592: URL: https://github.com/apache/logging-log4j2/pull/1592#issuecomment-1758014731 > I am not in favor of this. We should fix the original problem that a JSON or YAML configuration is found but dependencies are missing to log at error instead. Looking at the thread on dev, I believe majority did not like the idea of changing default StatusLogger level, so changes reverted and error logged as suggested (JSON/YAML ConfigurationFactory is not active and found corresponding config file). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Issue 1501: increase default StatusLogger level to warn (logging-log4j2)
rgoers commented on PR #1592: URL: https://github.com/apache/logging-log4j2/pull/1592#issuecomment-1652657784 I am not in favor of this. We should fix the original problem that a JSON or YAML configuration is found but dependencies are missing to log at error instead. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Issue 1501: increase default StatusLogger level to warn (logging-log4j2)
ppkarwasz commented on code in PR #1592: URL: https://github.com/apache/logging-log4j2/pull/1592#discussion_r1274555963 ## log4j-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java: ## @@ -139,7 +139,7 @@ private StatusLogger( final MessageFactory messageFactory, final SimpleLoggerFactory loggerFactory) { super(name, messageFactory); -final Level loggerLevel = DEBUG_ENABLED ? Level.TRACE : Level.ERROR; +final Level loggerLevel = DEBUG_ENABLED ? Level.TRACE : Level.WARN; Review Comment: It would be probably useful to set this to `StatusLogger#DEFAULT_STATUS_LEVEL` here, so we can control it with a system property. ## log4j-core/src/main/java/org/apache/logging/log4j/core/config/status/StatusConfiguration.java: ## @@ -39,7 +39,7 @@ public class StatusConfiguration { @SuppressWarnings("UseOfSystemOutOrSystemErr") private static final PrintStream DEFAULT_STREAM = System.out; -private static final Level DEFAULT_STATUS = Level.ERROR; +private static final Level DEFAULT_STATUS = Level.WARN; Review Comment: Same as above: it should be the same value as the one returned by `AbstractConfiguration#getDefaultStatusLevel()`. Maybe `AbstractConfiguration#getDefaultStatusLevel()` should be rewritten in terms of this field. ## log4j-core/src/main/java/org/apache/logging/log4j/core/config/AbstractConfiguration.java: ## @@ -471,11 +471,11 @@ public void setup() { protected Level getDefaultStatus() { final String statusLevel = PropertiesUtil.getProperties().getStringProperty( -Constants.LOG4J_DEFAULT_STATUS_LEVEL, Level.ERROR.name()); +Constants.LOG4J_DEFAULT_STATUS_LEVEL, Level.WARN.name()); Review Comment: If `Constants.LOG4J_DEFAULT_STATUS_LEVEL` is unset ("log4j2.defaultStatusLevel"), I would first fall back onto the value of the property `StatusLogger.DEFAULT_STATUS_LISTENER_LEVEL` ("log4j2.statusLoggerLevel") and fall back to "WARN" if it fails. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org