You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Branislav Cogic (JIRA)" <ji...@apache.org> on 2016/02/17 12:03:18 UTC
[jira] [Updated] (SAMZA-872) Remove unsafe log4j
DailyRollingFileAppender from docs and hello-samza
[ https://issues.apache.org/jira/browse/SAMZA-872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Branislav Cogic updated SAMZA-872:
----------------------------------
Attachment: SAMZA-872.0.patch
Changed log4j configuration in hello-samza project to reference RolingFileAppender instead of DailyRollingFileAppender
> Remove unsafe log4j DailyRollingFileAppender from docs and hello-samza
> ----------------------------------------------------------------------
>
> Key: SAMZA-872
> URL: https://issues.apache.org/jira/browse/SAMZA-872
> Project: Samza
> Issue Type: Bug
> Reporter: Jake Maes
> Labels: newbie
> Attachments: SAMZA-872.0.patch
>
>
> DailyRollingFileAppender is known to have synchronization issues and cause data loss. It even claims this in its own documentation
> https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html
> We shouldn't be referencing such a problematic appender in Samza. Instead, we could reference RollingFileAppender with these settings:
> <appender name="RollingAppender" class="org.apache.log4j.RollingFileAppender">
> <param name="File" value="${samza.log.dir}/${samza.container.name}.log" />
> <param name="MaxFileSize" value="256MB" />
> <param name="MaxBackupIndex" value="20" />
> <layout class="org.apache.log4j.PatternLayout">
> <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n" />
> </layout>
> </appender>
> Docs:
> https://samza.apache.org/learn/documentation/0.10/jobs/logging.html
> Hello Samza:
> https://github.com/apache/samza-hello-samza/blob/master/src/main/resources/log4j.xml
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)