You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/05/27 04:13:45 UTC

[GitHub] [incubator-pinot] fx19880617 opened a new pull request #5442: Update pinot-admin and quickstart log4j config

fx19880617 opened a new pull request #5442:
URL: https://github.com/apache/incubator-pinot/pull/5442


   - logs all info level to a rolling file
   - configurable log directory and log pattern from env variable
   - eliminate console log to warn level
   - still logs info level for pinot tools related stuffs.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] kishred commented on a change in pull request #5442: Update pinot-admin and quickstart log4j config

Posted by GitBox <gi...@apache.org>.
kishred commented on a change in pull request #5442:
URL: https://github.com/apache/incubator-pinot/pull/5442#discussion_r430527249



##########
File path: pinot-tools/src/main/resources/conf/log4j2.xml
##########
@@ -20,33 +20,31 @@
 
 -->
 <Configuration>
-  <Appenders>
-    <Console name="console" target="SYSTEM_OUT">
-      <PatternLayout>
-        <pattern>%d{yyyy/MM/dd HH:mm:ss.SSS} %p [%c{1}] [%t] %m%n</pattern>
-      </PatternLayout>
-    </Console>
-    <RandomAccessFile name="ingestionJobLog" fileName="pinotIngestionJob.log" immediateFlush="false">
-      <PatternLayout>
-        <Pattern>%d{yyyy/MM/dd HH:mm:ss.SSS} %p [%c{1}] [%t] %m%n</Pattern>
-      </PatternLayout>
-    </RandomAccessFile>
 
+  <Properties>
+    <Property name="LOG_ROOT">logs</Property>
+    <Property name="LOG_PATTERN">%d{yyyy/MM/dd HH:mm:ss.SSS} %p [%c{1}] [%t] %m%n</Property>
+    <Property name="PINOT_COMPONENT">all</Property>
+  </Properties>
+  <Appenders>
+    <Console name="console" target="SYSTEM_OUT" />
+    <RollingFile name="pinotLog" fileName="${env:LOG_ROOT}/pinot-${env:PINOT_COMPONENT}.log"
+                 filePattern="${env:LOG_ROOT}/pinot-${env:PINOT_COMPONENT}-%d{yyyy-MM-dd}-%i.log" immediateFlush="false">

Review comment:
       Few comments:
   
   1. Log file name need not have date pattern since it is only size based rollover
   2. Enable compression to reduce the space used and increase the amount of logs to back in date. Use bzip2 compression since it has `bzgrep` tool to grep logs without uncompressing them.
   3. Follow the convention of *NIX rolled logs by moving `%i ` after `.log` extension
   
   Suggested filePattern that takes care of #1 and #2:
   
   `filePattern="${env:LOG_ROOT}/pinot-${env:PINOT_COMPONENT}.log.%i.bz2"`




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] fx19880617 commented on a change in pull request #5442: Update pinot-admin and quickstart log4j config

Posted by GitBox <gi...@apache.org>.
fx19880617 commented on a change in pull request #5442:
URL: https://github.com/apache/incubator-pinot/pull/5442#discussion_r430621171



##########
File path: pinot-tools/src/main/resources/conf/log4j2.xml
##########
@@ -20,33 +20,31 @@
 
 -->
 <Configuration>
-  <Appenders>
-    <Console name="console" target="SYSTEM_OUT">
-      <PatternLayout>
-        <pattern>%d{yyyy/MM/dd HH:mm:ss.SSS} %p [%c{1}] [%t] %m%n</pattern>
-      </PatternLayout>
-    </Console>
-    <RandomAccessFile name="ingestionJobLog" fileName="pinotIngestionJob.log" immediateFlush="false">
-      <PatternLayout>
-        <Pattern>%d{yyyy/MM/dd HH:mm:ss.SSS} %p [%c{1}] [%t] %m%n</Pattern>
-      </PatternLayout>
-    </RandomAccessFile>
 
+  <Properties>
+    <Property name="LOG_ROOT">logs</Property>
+    <Property name="LOG_PATTERN">%d{yyyy/MM/dd HH:mm:ss.SSS} %p [%c{1}] [%t] %m%n</Property>
+    <Property name="PINOT_COMPONENT">all</Property>
+  </Properties>
+  <Appenders>
+    <Console name="console" target="SYSTEM_OUT" />
+    <RollingFile name="pinotLog" fileName="${env:LOG_ROOT}/pinot-${env:PINOT_COMPONENT}.log"
+                 filePattern="${env:LOG_ROOT}/pinot-${env:PINOT_COMPONENT}-%d{yyyy-MM-dd}-%i.log" immediateFlush="false">

Review comment:
       Sounds good! I feel it's still better to use gzip for log files, which can be open by vim and grep by zgrep also. Changed to `${env:LOG_ROOT}/pinot-${env:PINOT_COMPONENT}.log.%i.gz`




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] xiangfu0 closed pull request #5442: Update pinot-admin and quickstart log4j config

Posted by GitBox <gi...@apache.org>.
xiangfu0 closed pull request #5442:
URL: https://github.com/apache/incubator-pinot/pull/5442


   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org