Justin,
I've tryed configuring log4j2 in my own custorm log4j2.xml with in my
topology. When running locally, my custom logs could be written to the
location I specified. But when running in storm cluster, all logs are
written to ***-worker-***.log, the reason may be supervisor has already
loaded its system-wide log4j2.xml, my custom configuration has no right to
override the default configuration.

2015-12-24 15:12 GMT+08:00 Justin Hopper <[email protected]>:

> Hong,
>
> Re-reading your message…you will need to change the configuration of the
> log4j/worker.xml file so that components/loggers under your package name
> (and those that you are interested go into a separate appender.
>
> So you’ll have to add a <Logger name=“org.maohong.tech”> and a <Logger
> name=“com.my.thirdparty.package”> etc etc. and then create Appenders for
> Files that are separate from those already declared (e.g. A1).
>
> As an alternative approach have you tried configuring Log4J2 with your own
> custom log4j2.xml from within your topology?
>
> Thanks,
>
> Justin
>
> > On Dec 23, 2015, at 22:52, hong mao <[email protected]> wrote:
> >
> > When I run a topology on storm 0.10.0, each conponent's log is written
> to ***-worker-***.log, mixed together with logs generated by storm
> framework.
> >
> > I found it is very inconvenient to debug my topology, I have to search
> carefully to find out which logs are my spout/bolt's logs .
> >
> > Does anyone have a good solution for this case? Or are there any log4j
> configuration to support this feature? So that I can print my log to files
> in a seperated directory.
> >
> > Thank you!
>
>

Reply via email to