You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2021/08/25 11:46:06 UTC

[GitHub] [brooklyn-server] jcabrerizo commented on a change in pull request #1231: More log traceability

jcabrerizo commented on a change in pull request #1231:
URL: https://github.com/apache/brooklyn-server/pull/1231#discussion_r695671171



##########
File path: logging/logback-includes/src/main/resources/brooklyn/logback-appender-jclouds.xml
##########
@@ -29,7 +29,8 @@
                 <file>${logging.dir:-./}${logging.basename:-brooklyn}.${jcloudsPersistSwitch}.log</file>
                 <append>true</append>
                 <encoder>
-                    <pattern>%d %-5level %logger{30} [%thread{15}]: %msg%n</pattern>
+                    <pattern>%d{ISO8601} %-5.5p %c{1}  %m%n</pattern>

Review comment:
       Same as above

##########
File path: test-support/src/main/java/org/apache/brooklyn/test/LogWatcher.java
##########
@@ -186,13 +187,7 @@ public LogWatcher(Iterable<String> loggerNames, ch.qos.logback.classic.Level log
             }
         };
 
-        // The code below makes the assumption that the (test) logger configuration has a console appender
-        // for root, with a pattern layout encoder, and re-uses its encoder pattern.
-        // This is (at time of writing) as defined in logback-appender-stdout.xml.
-        final Appender<ILoggingEvent> appender = lc.getLogger("ROOT").getAppender("STDOUT");
-        final ConsoleAppender<?> stdout = ConsoleAppender.class.cast(appender);
-        final PatternLayoutEncoder stdoutEncoder = PatternLayoutEncoder.class.cast(stdout.getEncoder());
-        ple.setPattern(stdoutEncoder.getPattern());
+        ple.setPattern("%d{ISO8601} %8X{task.id}-%-23X{entity.ids} %-5.5p %-48c{1}  %m%n");

Review comment:
       Same as above

##########
File path: logging/logback-includes/src/main/resources/brooklyn/logback-appender-stdout.xml
##########
@@ -21,7 +21,9 @@
 
   <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
     <encoder>
-      <pattern>%d %-5level %X{task.id}-%X{entity.ids} %msg%n</pattern>
+<!--      <pattern>%d %-5level %X{task.id}-%X{entity.ids} %msg%n</pattern> -->
+<!--      <pattern>%d{ISO8601}{UTC}Z %X{task.id}-%X{entity.ids} %-5.5p %c{1.} [%.16t] %m%n</pattern>-->
+      <pattern>%d{ISO8601} %-5.5p %-48c{1}  %m%n</pattern>

Review comment:
       Same as above

##########
File path: utils/test-support/src/main/resources/brooklyn/logback-appender-file.xml
##########
@@ -23,7 +23,8 @@
     <file>${logging.dir:-./}${logging.basename:-brooklyn}-tests.log</file>
     <append>true</append>
     <encoder>
-      <pattern>%d %-5level %logger{30} [%thread{15}]: %msg%n</pattern>
+      <pattern>%d{ISO8601} %8X{task.id}-%-23X{entity.ids} %-5.5p [%.16t] %-48c{1}  %m%n</pattern>

Review comment:
       Same as above

##########
File path: logging/logback-includes/src/main/resources/brooklyn/logback-appender-file.xml
##########
@@ -23,7 +23,8 @@
     <file>${logging.dir:-./}${logging.basename:-brooklyn}.debug.log</file>
     <append>true</append>
     <encoder>
-      <pattern>%d %-5level %logger{30} [%thread{15}]: %msg%n</pattern>
+      <pattern>%d{ISO8601} %8X{task.id}-%-23X{entity.ids} %-5.5p [%.16t] %-48c{1}  %m%n</pattern>

Review comment:
       For using UTC timezone the pattern should be
   ```
   <pattern>%d{ISO8601}{UTC}Z %8X{task.id}-%-23X{entity.ids} %-5.5p [%.16t] %-48c{1}  %m%n</pattern>
   ```

##########
File path: logging/logback-includes/src/main/resources/brooklyn/logback-appender-file.xml
##########
@@ -44,7 +45,8 @@
     <file>${logging.dir:-./}${logging.basename:-brooklyn}.info.log</file>
     <append>true</append>
     <encoder>
-      <pattern>%d %-5level %logger{30} [%thread{15}]: %msg%n</pattern>
+      <pattern>%d{ISO8601} %8X{task.id}-%-23X{entity.ids} %-5.5p %-48c{1}  %m%n</pattern>

Review comment:
       Same as above 




-- 
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: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org