Enum Class FixtureLogLevel

java.lang.Object
java.lang.Enum<FixtureLogLevel>
de.gebit.integrity.fixtures.logging.FixtureLogLevel
All Implemented Interfaces:
Serializable, Comparable<FixtureLogLevel>, java.lang.constant.Constable

public enum FixtureLogLevel extends Enum<FixtureLogLevel>
Log levels for log output of Integrity fixture code.
Author:
Rene Schneider - initial API and implementation
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Debug log output is intended for fixture developers and may be used to expose detailed internal information useful to diagnose problems with a fixture.
    Errors are incidents that make it impossible for the fixture to perform its job correctly.
    Info messages are just that - information to the fixture or test author, exposing some kind of internal data that might be useful to write tests.
    Trace log output should be extremely detailed information about fixture internals that is NOT usually needed to diagnose problems with a fixture, but that MAY be useful in specific circumstances.
    Warnings should still result in successful fixture execution, but indicate some kind of "soft problem" that appeared while doing the job and that the fixture code dealt with successfully.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    Whether the level this is called upon is finer than the given log level or equals it.
    boolean
    Whether the level this is called upon is finer than the given log level.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • ERROR

      public static final FixtureLogLevel ERROR
      Errors are incidents that make it impossible for the fixture to perform its job correctly. Note that you should most likely throw an exception in such a case, which then results in a very visible stack trace being logged into the test result. However, it may be useful to provide additional information (more than is practical in an exception message) to deal with the problem in the form of ERROR log messages before finishing fixture execution by throwing the exception.
    • WARNING

      public static final FixtureLogLevel WARNING
      Warnings should still result in successful fixture execution, but indicate some kind of "soft problem" that appeared while doing the job and that the fixture code dealt with successfully. Fallbacks in the code are a typical example for this.
    • INFO

      public static final FixtureLogLevel INFO
      Info messages are just that - information to the fixture or test author, exposing some kind of internal data that might be useful to write tests.
    • DEBUG

      public static final FixtureLogLevel DEBUG
      Debug log output is intended for fixture developers and may be used to expose detailed internal information useful to diagnose problems with a fixture. The debug level is by default the finest level that is actually being captured into test results.
    • TRACE

      public static final FixtureLogLevel TRACE
      Trace log output should be extremely detailed information about fixture internals that is NOT usually needed to diagnose problems with a fixture, but that MAY be useful in specific circumstances. Capturing trace log lines is disabled by default, because it is expected that trace log data is large in volume and of limited general use.
  • Method Details

    • values

      public static FixtureLogLevel[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FixtureLogLevel valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • isFinerThan

      public boolean isFinerThan(FixtureLogLevel anOtherLevel)
      Whether the level this is called upon is finer than the given log level.
      Parameters:
      anOtherLevel - the level to compare with
      Returns:
      true if this level is finer than the provided one
    • isEqualOrFinerThan

      public boolean isEqualOrFinerThan(FixtureLogLevel anOtherLevel)
      Whether the level this is called upon is finer than the given log level or equals it.
      Parameters:
      anOtherLevel - the level to compare with
      Returns:
      true if this level is finer than the provided one or equals it
    • getPaddedName

      public String getPaddedName()