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