Package org.apache.torque.generator.configuration.controller

# Class Log4j2LoggingAdapter

java.lang.Object
org.apache.torque.generator.configuration.controller.Log4j2LoggingAdapter

All Implemented Interfaces:
  `LoggingAdapter`

public class Log4j2LoggingAdapter extends Object implements LoggingAdapter
Allows reading and setting the current loglevel using log4j2.

Version:
  $Id$

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Log4j2LoggingAdapter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Loglevel`
  `getCurrentLoglevel()`
  Returns the current loglevel by reading the loglevel of the root logger.
  `void`
  `setLoglevel(Loglevel loglevel)`
  Sets the loglevel to the given loglevel by changing the level of the log4j root logger.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Log4j2LoggingAdapter

    public Log4j2LoggingAdapter()

- ## Method Details

  - ### getCurrentLoglevel

    public Loglevel getCurrentLoglevel()
    Returns the current loglevel by reading the loglevel of the root logger.
    Specified by:
      `getCurrentLoglevel` in interface `LoggingAdapter`
    Returns:
      the current loglevel, or INFO if the current loglevel cannot be determined.

  - ### setLoglevel

    public void setLoglevel(Loglevel loglevel)
    Sets the loglevel to the given loglevel by changing the level of the log4j root logger.
    Specified by:
      `setLoglevel` in interface `LoggingAdapter`
    Parameters:
      `loglevel` - the loglevel to set, not null.