Shawyeok commented on code in PR #3584:
URL: https://github.com/apache/bookkeeper/pull/3584#discussion_r1067232558


##########
conf/log4j2.xml:
##########
@@ -28,13 +28,13 @@
     </Properties>
     <Appenders>
         <Console name="CONSOLE" target="SYSTEM_OUT">
-            <PatternLayout pattern="%d{ISO8601} - %-5p - [%t:%C{1}@%L] - 
%m%n"/>
+            <PatternLayout pattern="%d{ISO8601} - %-5p - [%t:%c{1}] - %m%n"/>
         </Console>
         <File name="TRACEFILE" 
fileName="${sys:bookkeeper.log.dir}/bookkeeper-trace.log">
-            <PatternLayout pattern="%d{ISO8601} - %-5p [%t:%C{1}@%L][%ndc] - 
%m%n"/>
+            <PatternLayout pattern="%d{ISO8601} - %-5p [%t:%c{1}][%ndc] - 
%m%n"/>
         </File>
         <RollingFile name="ROLLINGFILE" 
fileName="${sys:bookkeeper.log.dir}/${sys:bookkeeper.log.file}" 
filePattern="${sys:bookkeeper.log.dir}/${sys:bookkeeper.log.file}%d{.yyyy-MM-dd}">
-            <PatternLayout pattern="%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n"/>
+            <PatternLayout pattern="%d{ISO8601} - %-5p [%t:%c{1}] - %m%n"/>

Review Comment:
   `%d{ISO8601} [%t] %-5level %logger - %m%n%ex`
   
   @hangc0276  Sorry for late reply.
   
   If we change log pattern, why not make one step further, isn't? So, how 
about this?
   - %-5p and %-5level is identical but later is more readable
   - %logger is identical with %c, logger name with full package name, pay a 
little more disk space
   - the `-` after timestamp is redundant
   - %ex is to prevent default %xEx, which is to add packaging information 
about each stack trace element, that means more cost. see more: 
`org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter`



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