-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[STORM-3198] Topology submitters should be able to supply log4j2 conf #2806
Conversation
pom.xml
Outdated
@@ -278,7 +278,7 @@ | |||
<netty.version>4.1.25.Final</netty.version> | |||
<sysout-over-slf4j.version>1.0.2</sysout-over-slf4j.version> | |||
<log4j-over-slf4j.version>1.6.6</log4j-over-slf4j.version> | |||
<log4j.version>2.8.2</log4j.version> | |||
<log4j.version>2.11.0</log4j.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: The update to log4j2-2.11.0 is not strictly necessary. 2.8.2 supports composite configuration. However, there was a bug in merging filters from child configurations that I got fixed in 2.11.0. If a child configuration added filters and there were none in the parent, the child filter would be ignored.
I would like to add some filters in my topology, so, bumping the version to the one with the fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless we know of a reason not to, we could just bump to the latest version IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not aware of any such reason; done
storm-server/src/main/java/org/apache/storm/daemon/supervisor/BasicContainer.java
Show resolved
Hide resolved
pom.xml
Outdated
@@ -278,7 +278,7 @@ | |||
<netty.version>4.1.25.Final</netty.version> | |||
<sysout-over-slf4j.version>1.0.2</sysout-over-slf4j.version> | |||
<log4j-over-slf4j.version>1.6.6</log4j-over-slf4j.version> | |||
<log4j.version>2.8.2</log4j.version> | |||
<log4j.version>2.11.0</log4j.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless we know of a reason not to, we could just bump to the latest version IMO.
Looks like there are a couple unit tests I need to fix. Probably won't get to that till next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love the change +1 for that, but @jacobtolar there are unit tests that verify exactly what is coming out on the command line, and they are failing because you changed the order of the commands on the command line.
Please take a look at org.apache.storm.daemon.supervisor.BasicContainerTest
Yeah, sorry it took me a while to get to fixing it. Hopefully that does it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
+1. Please squash to one commit @jacobtolar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
73b25f6
to
620ccf9
Compare
rebased to latest master and squashed into one commit |
… STORM-3198 STORM-3198: Topology submitters should be able to supply log4j2 conf This closes #2806
This adds a new config setting,
topology.logging.config
, that allows a topology submitter to specify an additional log4j2 config to be used via composite configuration.When the worker starts the
-Dlog4j.configurationFile
option is modified to include the additional file if requested.To test, I submitted a topology (FastWordCountTopology):
topology_log4j2.xml:
With this child configuration added, the messages about preparing bolts no longer appear in the worker log.
I also tested changing simply changing the log level in the child log4j2 config and that also works as expected.