gnodet commented on code in PR #2042:
URL: https://github.com/apache/maven/pull/2042#discussion_r1920628863


##########
impl/maven-cli/src/main/java/org/apache/maven/cling/logging/impl/MavenSimpleConfiguration.java:
##########
@@ -37,7 +41,14 @@ public void setRootLoggerLevel(Level level) {
                     case INFO -> "info";
                     default -> "error";
                 };
-        System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", value);
+
+        String current = 
System.getProperty(MavenSimpleLogger.DEFAULT_LOG_LEVEL_KEY);

Review Comment:
   Yes, a CLI option seems more explicit to me that a value from system 
properties.  CLI options are usually set by the user for a given invocation, 
while system properties can come from various sources (also from CLI, that's 
right).
   I think this would be in line with the example I pasted a few days ago:
   ```
           String styleColor = mavenOptions
                   .color()
                   .orElse(userProperties.getOrDefault(
                           Constants.MAVEN_STYLE_COLOR_PROPERTY, 
userProperties.getOrDefault("style.color", "auto")));
   ```
   where the color option comes first from the CLI options, then user 
properties (in that case, we have the new, then the legacy property).



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to