Reputation: 71
Consider that I hava a storm cluster that runs two Topologies (A and B), but I just change the ${storm_dir}/logback/cluster.xml
in supervisor machines, so A and B are using the same log configurations, how to configure the logback.xml
in different project instead of changing it in storm-cluser? I am worried about that
Upvotes: 3
Views: 2035
Reputation: 1006
Regarding to official documentation no other ways there. The logs are configured only in the $STORM_HOME/logback/cluster.xml (since 0.9). The main problem is that logviewer daemon depends on that file to be able to find and display worker logs. Overriding it would break the log viewer functionality.
Personally in your case you can separate your topologies by the different packages. It's allow you configure loggers for your topologies in the similar way:
<logger name="com.example.topology.A">
<level level="DEBUG"/>
<appender-ref ref="FILE_A"/>
<appender-ref ref="CONSOLE"/>
</logger>
<logger name="com.example.topology.B">
<level level="WARN"/>
<appender-ref ref="FILE_B"/>
<appender-ref ref="CONSOLE"/>
</logger>
So, you can specify different logger level and appender for different topologies just change cluster.xml file.
Upvotes: 1