Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## org.apache.torque.generator.configuration.controller
Enum Loglevel

    java.lang.Object
      java.lang.Enum<Loglevel>
          org.apache.torque.generator.configuration.controller.Loglevel

All Implemented Interfaces:
  Serializable, Comparable<Loglevel>

    public enum Loglevel

extends Enum<Loglevel>

The possible log levels. This class uses by default log4j internally, but the logging framework can be exchanged using the setLoggingAdapter method. The public API of this class is agnostic of the logging framework.

Enum Constant Summary
`DEBUG` Loglevel debug.
`ERROR` Loglevel error.
`INFO` Loglevel info.
`TRACE` Loglevel trace.
`WARN` Loglevel warn.

Method Summary
`void` | `apply()` Applies the log level.
`static Loglevel` | `getByKey(String key)` Returns the Loglevel for a given key.
`static Loglevel` | `getCurrentLoglevel()` Returns the current loglevel.
`String` | `getKey()` Returns the key of the Loglevel.
`static LoggingAdapter` | `getLoggingAdapter()` Returns the currently used logging adapter.
`static void` | `setLoggingAdapter(LoggingAdapter loggingAdapter)` Sets the logging adapter.
`static Loglevel` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static Loglevel[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### TRACE

    public static final Loglevel TRACE

  Loglevel trace.

### DEBUG

    public static final Loglevel DEBUG

  Loglevel debug.

### INFO

    public static final Loglevel INFO

  Loglevel info.

### WARN

    public static final Loglevel WARN

  Loglevel warn.

### ERROR

    public static final Loglevel ERROR

  Loglevel error.

Method Detail

### values

    public static Loglevel[] values()

  Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

      for (Loglevel c : Loglevel.values())
          System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they are declared

### valueOf

    public static Loglevel valueOf(String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `IllegalArgumentException` - if this enum type has no constant with the specified name
    `NullPointerException` - if the argument is null

### getKey

    public String getKey()

  Returns the key of the Loglevel.

  Returns:
    the key of the Loglevel, not null.

### apply

    public void apply()

  Applies the log level.

### getByKey

    public static Loglevel getByKey(String key)

  Returns the Loglevel for a given key.

  Parameters:
    `key` - the key to look for.
  Returns:
    the corresponding Loglevel, not null.
  Throws:
    `IllegalArgumentException` - if no Loglevel can be found for the key.

### getCurrentLoglevel

    public static Loglevel getCurrentLoglevel()

  Returns the current loglevel.

  Returns:
    the current loglevel, or INFO if the current loglevel cannot be determined.

### getLoggingAdapter

    public static LoggingAdapter getLoggingAdapter()

  Returns the currently used logging adapter.

  Returns:
    the current logging adapter, not null.

### setLoggingAdapter

    public static void setLoggingAdapter(LoggingAdapter loggingAdapter)

  Sets the logging adapter.

  Throws:
    `NullPointerException` - if loggingAdapter is null.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

Copyright © 2000-2013 The Apache Software Foundation. All Rights Reserved.