[
https://issues.apache.org/jira/browse/SAMZA-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13809616#comment-13809616
]
Chris Riccomini commented on SAMZA-60:
--------------------------------------
All tests pass.
Also have a pull request for hello-samza, which I tested locally.
https://github.com/linkedin/hello-samza/pull/8
> Specify log directory as a Java property for Log4j
> --------------------------------------------------
>
> Key: SAMZA-60
> URL: https://issues.apache.org/jira/browse/SAMZA-60
> Project: Samza
> Issue Type: Bug
> Components: container, yarn
> Affects Versions: 0.6.0
> Reporter: Chris Riccomini
> Assignee: Chris Riccomini
> Attachments: SAMZA-60.0.patch
>
>
> We currently specify SAMZA_LOG_DIR as an environment variable when starting
> Samza's YARN AM, and also when starting a Samza container with YARN.
> It'd be nice to expose the Samza job's name as an environment variable, as
> well: SAMZA_JOB_NAME.
> It'd also be nice to use these variables in log4j.xml (for example), so we
> can have a file-based appender. Unfortunately, it appears that Log4j wants
> Java system properties, not environment variables.
> Let's update run-class.sh to append new Java system properties to SAMZA_OPTS:
> {noformat}
> SAMZA_OPTS="$SAMZA_OPTS -Dsamza.log.dir=$SAMZA_LOG_DIR
> -Dsamza.job.name=$SAMZA_JOB_NAME"
> {noformat}
> Then, in log4j.xml, we should be able to set a file appender:
> {noformat}
> <appender name = "samzaAppender"
> class="org.apache.log4j.RollingFileAppender">
> ...
> <param name="file" value="${samza.log.dir}/${samza.job.name}.log" />
> ...
> </appender>
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.1#6144)