You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Justin Hopper <ju...@dev9.com> on 2016/03/01 05:55:50 UTC

Re: Storm 0.10.x defining log file for topology.

0.10.0 uses log4j2. Look under log4j2 directory and your will find a worker.xml file or something to that effect. In there you can define the output. Keep in mind that this will affect all topologies in that supervisor.

On Feb 29, 2016, at 13:52, Stephen Powis <sp...@salesforce.com>> wrote:

Hey!

I recently upgraded to Storm 0.10.0 (and log4j as a result).  I've noticed that topologies no longer log into worker-<workerid>.log and instead into a file named <topologyid>-worker-<workerid>.log

I was curious as to if there's a way to control what the name of this log file is.  I've tried adding a topology config item named "logfile.name<http://logfile.name>" but no luck.  I must be missing something.  Is there a way to hardcode the topology Id, or set this logfile to a static value on a per topology basis?

Thanks!

Re: Storm 0.10.x defining log file for topology.

Posted by Stephen Powis <sp...@salesforce.com>.
So is there no topologly level conf option to alter the target filename?
It seems like the default log4j2 config looks at a system property to
determine it.  Looking at source code where workers are launched, it looks
like that property is passed in on the command line here, but my clojure
isn't great

https://github.com/apache/storm/blob/master/storm-core/src/clj/org/apache/storm/daemon/supervisor.clj#L1203



On Mon, Feb 29, 2016 at 11:55 PM, Justin Hopper <ju...@dev9.com>
wrote:

> 0.10.0 uses log4j2. Look under log4j2 directory and your will find a
> worker.xml file or something to that effect. In there you can define the
> output. Keep in mind that this will affect all topologies in that
> supervisor.
>
> On Feb 29, 2016, at 13:52, Stephen Powis <sp...@salesforce.com> wrote:
>
> Hey!
>
> I recently upgraded to Storm 0.10.0 (and log4j as a result).  I've noticed
> that topologies no longer log into worker-<workerid>.log and instead into a
> file named <topologyid>-worker-<workerid>.log
>
> I was curious as to if there's a way to control what the name of this log
> file is.  I've tried adding a topology config item named "logfile.name"
> but no luck.  I must be missing something.  Is there a way to hardcode the
> topology Id, or set this logfile to a static value on a per topology basis?
>
> Thanks!
>
>