klsince commented on code in PR #9400:
URL: https://github.com/apache/pinot/pull/9400#discussion_r971465896
##########
pinot-tools/src/main/resources/log4j2.xml:
##########
@@ -39,6 +39,25 @@
</Policies>
<DefaultRolloverStrategy max="10"/>
</RollingFile>
+ <Routing name="taskLogs" ignoreExceptions="false">
+ <Routes pattern="${ctx:taskId}">
+ <Route>
+ <RollingFile
+ name="minionTaskLogs-${ctx:taskId}"
+
fileName="${env:LOG_ROOT}/minionTaskLogs-${ctx:taskId:-default}.log"
+
filePattern="${env:LOG_ROOT}/minionTaskLogs-%d{yyyy-MM-dd}-%i.log"
+ immediateFlush="true">
+ <PatternLayout pattern="${env:LOG_PATTERN}"/>
+ <Policies>
+ <SizeBasedTriggeringPolicy size="19500KB"/>
+ </Policies>
+ <DefaultRolloverStrategy max="50"/>
+ </RollingFile>
+ </Route>
+ </Routes>
+ <!-- Created appender TTL -->
+ <IdlePurgePolicy timeToLive="15" timeUnit="minutes"/>
Review Comment:
per the doc: 15min TTL is used to close the dynamically created appender,
after it's idle for up to TTL.
as to purge old log files, there are multiple options: by max count as in
the example here or time based (which may be more suitable for prod use, e.g.
to keep log files as long as the task info is kept in helix, which is 24hr by
default)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]