Class ProvLevel

  • All Implemented Interfaces:
    Serializable

    public class ProvLevel
    extends org.apache.log4j.Level
    Adapted from http://jaitechwriteups.blogspot.co.uk/2006/07/create-your-own-logging-level-in-log4j.html
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.apache.log4j.Level PROV
      Level representing my log level
      static String PROV_STRING  
      static int PROVENANCE_INT
      Value of Provenance trace level.
      • Fields inherited from class org.apache.log4j.Level

        ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, TRACE_INT, WARN
      • Fields inherited from class org.apache.log4j.Priority

        ALL_INT, DEBUG_INT, ERROR_INT, FATAL_INT, INFO_INT, OFF_INT, WARN_INT
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ProvLevel​(int arg0, String arg1, int arg2)
      Constructor
    • Method Summary

      Modifier and Type Method Description
      static org.apache.log4j.Level toLevel​(int val)
      Checks whether val is #PROVENANCE_INT.
      static org.apache.log4j.Level toLevel​(int val, org.apache.log4j.Level defaultLevel)
      Checks whether val is #PROVENANCE_INT.
      static org.apache.log4j.Level toLevel​(String sArg)
      Checks whether sArg is "PROV" level.
      static org.apache.log4j.Level toLevel​(String sArg, org.apache.log4j.Level defaultLevel)
      Checks whether sArg is "MY_TRACE" level.
      • Methods inherited from class org.apache.log4j.Priority

        equals, getAllPossiblePriorities, getSyslogEquivalent, isGreaterOrEqual, toInt, toPriority, toPriority, toPriority, toPriority, toString
    • Field Detail

      • PROVENANCE_INT

        public static final int PROVENANCE_INT
        Value of Provenance trace level. This value is lesser than Priority.INFO_INT and higher than Priority.DEBUG_INT
        See Also:
        Constant Field Values
      • PROV

        public static final org.apache.log4j.Level PROV
        Level representing my log level
    • Constructor Detail

      • ProvLevel

        protected ProvLevel​(int arg0,
                            String arg1,
                            int arg2)
        Constructor
        Parameters:
        arg0 -
        arg1 -
        arg2 -
    • Method Detail

      • toLevel

        public static org.apache.log4j.Level toLevel​(String sArg)
        Checks whether sArg is "PROV" level. If yes then returns PROV, else calls toLevel(String, Level) passing it Level.DEBUG as the defaultLevel.
        See Also:
        Level.toLevel(java.lang.String), Level.toLevel(java.lang.String, org.apache.log4j.Level)
      • toLevel

        public static org.apache.log4j.Level toLevel​(int val)
        Checks whether val is #PROVENANCE_INT. If yes then returns #PROV, else calls #toLevel(int, Level) passing it Level.DEBUG as the defaultLevel
        See Also:
        Level.toLevel(int), Level.toLevel(int, org.apache.log4j.Level)
      • toLevel

        public static org.apache.log4j.Level toLevel​(int val,
                                                     org.apache.log4j.Level defaultLevel)
        Checks whether val is #PROVENANCE_INT. If yes then returns #PROV, else calls Level.toLevel(int, org.apache.log4j.Level)
        See Also:
        Level.toLevel(int, org.apache.log4j.Level)
      • toLevel

        public static org.apache.log4j.Level toLevel​(String sArg,
                                                     org.apache.log4j.Level defaultLevel)
        Checks whether sArg is "MY_TRACE" level. If yes then returns #PROV, else calls Level.toLevel(java.lang.String, org.apache.log4j.Level)
        See Also:
        Level.toLevel(java.lang.String, org.apache.log4j.Level)