Class MarkingClassLogger

java.lang.Object
com.google.common.flogger.AbstractLogger<MarkingClassLogger.Api>
rma.util.logging.MarkingClassLogger

public final class MarkingClassLogger extends com.google.common.flogger.AbstractLogger<MarkingClassLogger.Api>
Note that when extending the logging API or specifying a new parser, you will need to create a new logger class (rather than extending this one). Unlike the LogContext class, which must be extended in order to modify the logging API, this class is not generified and thus cannot be modified to produce a different logging API.

The choice to prevent direct extension of loggers was made deliberately to ensure that users of a specific logger implementation always get the same behavior.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    The non-wildcard, fully specified, logging API for this logger.
  • Method Summary

    Modifier and Type
    Method
    Description
    at(Level level)
    Log at the specified level.
    forMarkingClass(Class<?> markingClass)
    Returns a new logger instance which parses log messages using printf format for the enclosing class using the system default logging backend.

    Methods inherited from class com.google.common.flogger.AbstractLogger

    atConfig, atFine, atFiner, atFinest, atInfo, atSevere, atWarning, getName, isLoggable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • forMarkingClass

      public static MarkingClassLogger forMarkingClass(Class<?> markingClass)
      Returns a new logger instance which parses log messages using printf format for the enclosing class using the system default logging backend.
      Parameters:
      markingClass - The "marking" class for this logger. Before logging, this logger will check both the class that calls forMarkingClass and the markingClass to see if either one or both are loggable. If this functionality is not necessary or desired, see FluentLogger.
    • at

      public MarkingClassLogger.Api at(Level level)
      Log at the specified level.
      Specified by:
      at in class com.google.common.flogger.AbstractLogger<MarkingClassLogger.Api>