Class Log4jLoggingAdapter
java.lang.Object
org.apache.torque.generator.configuration.controller.Log4jLoggingAdapter
- All Implemented Interfaces:
LoggingAdapter
Allows reading and setting the current loglevel using log4j.
- Version:
- $Id: Log4jLoggingAdapter.java 1839288 2018-08-27 09:48:33Z tv $
-
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
-
Log4jLoggingAdapter
public Log4jLoggingAdapter()
-
-
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.
-