Class LoggingLevel

java.lang.Object
java.util.logging.Level
com.google.cloud.logging.LoggingLevel
All Implemented Interfaces:
Serializable

public final class LoggingLevel extends Level
This class adds some additional Java logging levels for Cloud Logging. Added levels fill in the gap between Java logging levels and Cloud Logging severities.

Added levels in descending order are (between parenthesis the relation with Java logging levels):

  • EMERGENCY
  • ALERT
  • CRITICAL
  • ERROR (WARNING < ERROR < SEVERE)
  • NOTICE (INFO < NOTICE < WARNING)
  • DEBUG (ALL < DEBUG < FINEST

Notice that ERROR is lower than Level.SEVERE but higher than Level.WARNING. DEBUG instead is lower than Level.FINEST but higher than Level.ALL.

See Also:
  • Field Details

    • DEBUG

      public static final LoggingLevel DEBUG
      A level to be used for debug or trace information. This level is initialized to 250.
    • NOTICE

      public static final LoggingLevel NOTICE
      A level to be used when normal events occur, such as start up and shut down. This level is initialized to 850.
    • ERROR

      public static final LoggingLevel ERROR
      A level to be used when events occur that are likely to cause problems. This level is initialized to 950.
    • CRITICAL

      public static final LoggingLevel CRITICAL
      A level to be used when critical events cause more severe problems or brief outages. This level is initialized to 1050.
    • ALERT

      public static final LoggingLevel ALERT
      A level to be used when a person must take an action immediately. This level is initialized to 1100.
    • EMERGENCY

      public static final LoggingLevel EMERGENCY
      A levet to be used when one or more systems are unusable. This level is initialized to 1150.
  • Method Details

    • getSeverity

      public Severity getSeverity()
      Returns the Cloud Logging severity associated with this logging level.