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 03:44:34 UTC

[GitHub] [brooklyn-server] ahgittin opened a new pull request #1231: More log traceability

ahgittin opened a new pull request #1231:
URL: https://github.com/apache/brooklyn-server/pull/1231


   Many tasks did not correctly get task id and entity ids as part of logging context.  This fixes that.
   
   It also tweaks the format not to include all ancestor entities as part of each log message, just app ID and entity ID; and adds LoggingCategories with messages for common activities (entity creation/deletion, app creation/deletion, task tree).
   
   Format made a little nicer too, but not (yet) for OSGi, just POJO and tests.


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



[GitHub] [brooklyn-server] jcabrerizo merged pull request #1231: More log traceability

Posted by GitBox <gi...@apache.org>.
jcabrerizo merged pull request #1231:
URL: https://github.com/apache/brooklyn-server/pull/1231


   


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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
iuliana commented on a change in pull request #1231:
URL: https://github.com/apache/brooklyn-server/pull/1231#discussion_r695539492



##########
File path: core/src/test/java/org/apache/brooklyn/core/entity/ApplicationLoggingTest.java
##########
@@ -97,12 +91,13 @@ protected void doStop() {
     public static final class TestEntityWithLoggingImp extends TestEntityImpl implements TestEntityWithLogging {

Review comment:
       I think you intended this class to be named `TestEntityWithLoggingImpl`. The 'L' at the end is misisng.




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