davsclaus commented on code in PR #28113:
URL: https://github.com/apache/camel/pull/28113#discussion_r4316324088


##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/RuntimeUtil.java:
##########
@@ -117,12 +130,14 @@ public static void configureLog(
         } else if (json) {
             location = "log4j2-json.properties";
         } else if (color) {
-            location = "log4j2.properties";
+            location = COLOR_CONFIG;
         } else {
             location = "log4j2-no-color.properties";
         }
 
         synchronized (RuntimeUtil.class) {
+            // log4j resolves the name of a log file when it loads the 
configuration
+            System.setProperty(LOG_DIR, 
CommandLineHelper.getCamelDir().toString());

Review Comment:
   It is not an API: the CLI sets it so that its log files are in the Camel 
directory of the CLI, where `camel log` and the AI tools read them, and a value 
set before would hide the log from them. 75ba649e380f makes `LOG_DIR` 
package-private (only `LogConfigurationTest` uses it) and its javadoc says it 
is not an option.
   
   _Claude Code on behalf of Claus Ibsen_



-- 
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