Class LogbackLoggingSupport
java.lang.Object
org.apache.cassandra.utils.logging.LogbackLoggingSupport
- All Implemented Interfaces:
LoggingSupport
Encapsulates all logback-specific implementations in a central place.
Generally, the Cassandra code-base should be logging-backend agnostic and only use slf4j-api.
This class MUST NOT be used directly, but only via
LoggingSupportFactory which dynamically loads and
instantiates an appropriate implementation according to the used slf4j binding.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<ch.qos.logback.core.Appender<?>>getAppender(Class<?> appenderClass, String name) voidHook used to execute logging implementation specific customization at Cassandra shutdown time.voidHook used to execute logging implementation specific customization at Cassandra startup time.voidsetLoggingLevel(String classQualifier, String rawLevel) Changes the given logger to the given log level.
-
Constructor Details
-
LogbackLoggingSupport
public LogbackLoggingSupport()
-
-
Method Details
-
onStartup
public void onStartup()Description copied from interface:LoggingSupportHook used to execute logging implementation specific customization at Cassandra startup time.- Specified by:
onStartupin interfaceLoggingSupport
-
onShutdown
public void onShutdown()Description copied from interface:LoggingSupportHook used to execute logging implementation specific customization at Cassandra shutdown time.- Specified by:
onShutdownin interfaceLoggingSupport
-
setLoggingLevel
Description copied from interface:LoggingSupportChanges the given logger to the given log level.- Specified by:
setLoggingLevelin interfaceLoggingSupport- Parameters:
classQualifier- the class qualifier or logger namerawLevel- the string representation of a log level- Throws:
Exception- an exception which may occur while changing the given logger to the given log level.
-
getLoggingLevels
- Specified by:
getLoggingLevelsin interfaceLoggingSupport- Returns:
- a map of logger names and their associated log level as string representations.
-
getAppender
- Specified by:
getAppenderin interfaceLoggingSupport
-