Enum FixtureLogLevel

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FixtureLogLevel>

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

      Enum Constants 
      Enum Constant Description
      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.
      ERROR
      Errors are incidents that make it impossible for the fixture to perform its job correctly.
      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.
      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.
      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.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getPaddedName()  
      boolean isEqualOrFinerThan​(FixtureLogLevel anOtherLevel)
      Whether the level this is called upon is finer than the given log level or equals it.
      boolean isFinerThan​(FixtureLogLevel anOtherLevel)
      Whether the level this is called upon is finer than the given log level.
      static FixtureLogLevel valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static FixtureLogLevel[] 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

      • 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 Detail

      • values

        public static FixtureLogLevel[] 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 (FixtureLogLevel c : FixtureLogLevel.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FixtureLogLevel valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.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 java.lang.String getPaddedName()