org.apache.torque.generator.configuration.controller

## Class Log4jLoggingAdapter

- java.lang.Object
- - org.apache.torque.generator.configuration.controller.Log4jLoggingAdapter

- All Implemented Interfaces:
    LoggingAdapter

      public class Log4jLoggingAdapter
      extends Object
      implements 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
    Constructor and Description
    `Log4jLoggingAdapter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 Detail

    - #### Log4jLoggingAdapter

          public Log4jLoggingAdapter()

  - ### Method Detail

    - #### 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.

Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.