Class GoogleLogContext<LOGGER extends com.google.common.flogger.AbstractLogger<API>,​API extends GoogleLoggingApi<API>>

  • Type Parameters:
    LOGGER - The logger implementation from which this context is produced.
    API - The logging api supported by this context.
    All Implemented Interfaces:
    com.google.common.flogger.backend.LogData, GoogleLoggingApi<API>, com.google.common.flogger.LoggingApi<API>

    public abstract class GoogleLogContext<LOGGER extends com.google.common.flogger.AbstractLogger<API>,​API extends GoogleLoggingApi<API>>
    extends com.google.common.flogger.LogContext<LOGGER,​API>
    implements GoogleLoggingApi<API>
    Implementation of any Google specific extensions to the default fluent logging API. This could be implemented purely as an inner class inside GoogleLogger, but by making it abstract and top level, it allows other teams to subclass it to add additional functionality.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.google.common.flogger.LogContext

        com.google.common.flogger.LogContext.Key
      • Nested classes/interfaces inherited from interface com.google.common.flogger.LoggingApi

        com.google.common.flogger.LoggingApi.NoOp<API extends com.google.common.flogger.LoggingApi<API>>
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected GoogleLogContext​(java.util.logging.Level level, boolean isForced)
      Creates a logging context for the GoogleLoggerApi.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected com.google.common.flogger.parser.MessageParser getMessageParser()  
      • Methods inherited from class com.google.common.flogger.LogContext

        addMetadata, api, atMostEvery, every, getArguments, getLevel, getLiteralArgument, getLogger, getLoggerName, getLogSite, getMetadata, getTemplateContext, getTimestampMicros, getTimestampNanos, isEnabled, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, logVarargs, noOp, onAverageEvery, per, per, per, postProcess, removeMetadata, updateRateLimiterStatus, wasForced, with, with, withCause, withInjectedLogSite, withInjectedLogSite, withStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.google.common.flogger.LoggingApi

        atMostEvery, every, isEnabled, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, logVarargs, onAverageEvery, per, per, per, with, with, withCause, withInjectedLogSite, withInjectedLogSite, withStackTrace
    • Constructor Detail

      • GoogleLogContext

        protected GoogleLogContext​(java.util.logging.Level level,
                                   boolean isForced)
        Creates a logging context for the GoogleLoggerApi.
        Parameters:
        level - the log level of this log statement.
        isForced - whether the log statement should be forced.
    • Method Detail

      • getMessageParser

        protected final com.google.common.flogger.parser.MessageParser getMessageParser()
        Specified by:
        getMessageParser in class com.google.common.flogger.LogContext<LOGGER extends com.google.common.flogger.AbstractLogger<API>,​API extends GoogleLoggingApi<API>>