samza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yan Fang <>
Subject Re: log4j configuration
Date Tue, 04 Aug 2015 21:04:51 GMT
Hi Jordi,

This is a little tricky. :)

1. If you want to specify the logs to specific locations, please use the
following two properties, such as


2. then why doesn't export SAMZA_LOG_DIR work?

Because this setting only takes effect in your host machine. When you
submit the job, AM and containers do not inherit the environment variables
from their host.

3. then why can you still see the gc logs?

Though this variable does not affect AM and containers, it is used by the
YarnClient, which is used to submit the job. So essentially the gc log is
for the YarnClient (it dies after submitting). The log of YarnClient is
taken care by the* /bin/log4j-console.xml* file, not lib/log4j.xml (this
one is for the AM and all containers).

Hope this makes you a little clear.


Fang, Yan

On Tue, Aug 4, 2015 at 12:44 AM, Jordi Blasi Uribarri <>

> Hi,
> I guess this is just a howto question, but I am not able to find how it
> works. I am trying to trace the code of the job I want to execute in Samza.
> I have defined the environment variable as stated in the documentation:
> export SAMZA_LOG_DIR=/opt/logs
> I believe that this is working as I have seen that the garbage collector
> correctly generates the gc.o file and writes to it. The directories exists
> in all samza servers (two in my lab).
> I have added the following code to the job:
> Logger logger = Logger.getLogger(GetConfig.class);
>"Trace text message");
> Although the code is being executed (I can see the messages going through)
> I see no trace written. I don’t have experience with log4j and maybe it is
> there where I have to look but, I am missing something?
> Thanks,
>                 Jordi
> ________________________________
> Jordi Blasi Uribarri
> Área I+D+i
> Oficina Bilbao
> []

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message