Class LogMetricsHandler

java.lang.Object
java.util.logging.Handler
org.jboss.logmanager.ExtHandler
io.quarkus.runtime.logging.LogMetricsHandler
All Implemented Interfaces:
Flushable, AutoCloseable

public class LogMetricsHandler extends org.jboss.logmanager.ExtHandler
Measures the number of log messages based on logger configurations quarkus.log.level and quarkus.log.category.*.level

It should reflect the values of the handler that logs the most, since best practice is to align its level with the root level.

Non-standard levels are counted with the lower standard level.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final NavigableMap<Integer,LongAdder>
     

    Fields inherited from class org.jboss.logmanager.ExtHandler

    handlers, handlersUpdater, lock
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected void
    doPublish(org.jboss.logmanager.ExtLogRecord record)
     
    void
     

    Methods inherited from class org.jboss.logmanager.ExtHandler

    addHandler, checkAccess, checkAccess, clearHandlers, getCharset, getEncoding, getErrorManager, getFilter, getFormatter, getHandlers, getLevel, isAutoFlush, isCallerCalculationRequired, isCloseChildren, isEnabled, publish, publish, publishToNestedHandlers, removeHandler, reportError, reportError, setAutoFlush, setCharset, setCharsetPrivate, setCloseChildren, setEnabled, setEncoding, setErrorManager, setFilter, setFormatter, setHandlers, setLevel

    Methods inherited from class java.util.logging.Handler

    isLoggable

    Methods inherited from class java.lang.Object

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

  • Constructor Details

  • Method Details

    • doPublish

      protected void doPublish(org.jboss.logmanager.ExtLogRecord record)
      Overrides:
      doPublish in class org.jboss.logmanager.ExtHandler
    • flush

      public void flush()
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class org.jboss.logmanager.ExtHandler
    • close

      public void close() throws SecurityException
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class org.jboss.logmanager.ExtHandler
      Throws:
      SecurityException