David Capwell created CASSANDRA-15606:
-----------------------------------------
Summary: Support Logback and log4j2
Key: CASSANDRA-15606
URL: https://issues.apache.org/jira/browse/CASSANDRA-15606
Project: Cassandra
Issue Type: Improvement
Components: Observability/Logging
Reporter: David Capwell
Right now we only support Logback, CCM expects this as well; it is desirable to
also support log4j2.
Right now, if someone wishes to use log4j2 they have to do the following
1) Compile with Logback
2) delete logback jars
3) add log4j2 jars
4) disable logging in CCM
This should be simpler and should just be based off the operator (if Logback is
better for you, use it, if log4j2 is then use it).
The main point where we depend on Logback is
org.apache.cassandra.utils.logging.LogbackLoggingSupport and this is only
enabled if org.apache.cassandra.utils.logging.LoggingSupportFactory sees
“logback” in the class name; else everything is disabled (which is why the
above steps work). This logic adds some nice integration so this should not be
lost and should also be supported in log4j2.
Lastly, given the implementation of how slf4j picks the binding (ServiceLoader
which is classpath order), we should make sure its clear how to properly switch
between the two; ideally, if the operator some how selects both, the behavior
should be deterministic (slf4j is not))
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]