Class Log4j2LoggingAdapter
java.lang.Object
org.apache.torque.generator.configuration.controller.Log4j2LoggingAdapter
- All Implemented Interfaces:
LoggingAdapter
Allows reading and setting the current loglevel using log4j2.
- Version:
- $Id$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the current loglevel by reading the loglevel of the root logger.voidsetLoglevel(Loglevel loglevel) Sets the loglevel to the given loglevel by changing the level of the log4j root logger.
-
Constructor Details
-
Log4j2LoggingAdapter
public Log4j2LoggingAdapter()
-
-
Method Details
-
getCurrentLoglevel
Returns the current loglevel by reading the loglevel of the root logger.- Specified by:
getCurrentLoglevelin interfaceLoggingAdapter- Returns:
- the current loglevel, or INFO if the current loglevel cannot be determined.
-
setLoglevel
Sets the loglevel to the given loglevel by changing the level of the log4j root logger.- Specified by:
setLoglevelin interfaceLoggingAdapter- Parameters:
loglevel- the loglevel to set, not null.
-