[
https://issues.apache.org/jira/browse/STORM-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080459#comment-14080459
]
Bing Jiang edited comment on STORM-97 at 7/31/14 4:04 AM:
----------------------------------------------------------
[~xumingming] Is there any progresses on this topic? Will the Storm framework
support the setting of log level for each topology?
was (Author: jiangbinglover):
[~xumingming] Is there any progresses on this topic?
> Setting custom log levels per topology
> --------------------------------------
>
> Key: STORM-97
> URL: https://issues.apache.org/jira/browse/STORM-97
> Project: Apache Storm (Incubating)
> Issue Type: Improvement
> Reporter: James Xu
> Priority: Minor
>
> https://github.com/nathanmarz/storm/issues/149
> There is a log4j.xml that packaged in MyTopology.jar , when I startup the
> supervisor node, the task's logger use the config under the
> storm/log4j/storm.log.properties instead of my log4j.xml in jar .
> Otherware, I want to dynamic adjust the logger level on the fly. for example,
> I run a normal java application, the first thing is load logger config. for
> example:
> String log4jFile = System.getProperty("log4j.configuration","log4j.xml");
> if (!(new File(log4jFile).isFile())) return;
> String refreshInterval = System.getProperty("log4j.refreshInterval");
> long interval = StringUtils.isNotBlank(refreshInterval) ?
> Long.valueOf(refreshInterval) : 2000;
> try {
> Log4jConfigurer.initLogging(log4jFile, interval);
> } catch (FileNotFoundException e) {
> throw new RuntimeException("no find the log4j file. file = " + log4jFile,
> e);
> }
> Use the above code, I can change the logger level and don't redeploy the
> application.
--
This message was sent by Atlassian JIRA
(v6.2#6252)