about log4j configuration in storm topology

5,055 views
Skip to first unread message

macro chen

unread,
Feb 23, 2012, 12:43:59 AM2/23/12
to storm-user
There is a log4j.xml package in MyTopology.jar , when i startup the
supervisor node, the task's log4j use the config under the storm/log4j/
storm.log.properties instead of my log4j.xml in jar file. how to use
my log4j config file?

macro chen

unread,
Feb 23, 2012, 2:57:04 AM2/23/12
to storm-user
I add a item in the storm.yaml at the supervisor machine node:

worker.childopts: "-Dlog4j.configuration=log4j.xml"

then I restart supervisor. in the java process info , I get the
follow:
-server -Dlog4j.configuration=log4j.xml
-Dlogfile.name=worker-6702.log -
Dlog4j.configuration=storm.log.properties

that show double log4j.configration.


---------- Forwarded message ----------
From: macro chen <macrochen...@gmail.com>
Date: Feb 23, 1:43 pm
Subject: about log4j configuration in storm topology
To: storm-user


There is alog4j.xml package in MyTopology.jar , when i startup the
supervisor node, the task'slog4juse the config under the storm/log4j/
storm.log.properties instead of mylog4j.xml in jar file. how to use
mylog4jconfig file?

Nathan Marz

unread,
Feb 24, 2012, 12:32:38 AM2/24/12
to storm...@googlegroups.com
Why don't you modify the storm.log.properties file on the cluster?
--
Twitter: @nathanmarz
http://nathanmarz.com

macro chen

unread,
Feb 24, 2012, 2:19:57 AM2/24/12
to storm...@googlegroups.com
en, This is the only way?

2012/2/24 Nathan Marz <natha...@gmail.com>

Nathan Marz

unread,
Feb 24, 2012, 4:39:12 AM2/24/12
to storm...@googlegroups.com
Currently, yes. What's your use case for creating a topology-specific log4j configuration?

z1lv1n4s

unread,
Jul 2, 2013, 6:07:51 AM7/2/13
to storm...@googlegroups.com
My use case is I have a cluster that's running and I don't want to touch any of it's nodes or it's configuration. However I'm running topologies where I want to do some debug logging to a file .. 
Reply all
Reply to author
Forward
0 new messages