Details
-
Improvement
-
Status: Open
-
Normal
-
Resolution: Unresolved
-
None
-
None
-
Operability
-
Low Hanging Fruit
-
All
-
None
Description
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))
Attachments
Issue Links
- relates to
-
CASSANDRA-13212 Remove hard dependency on Logback
- Resolved