Package io.quarkus.runtime.logging
Class LogMetricsHandler
- java.lang.Object
-
- java.util.logging.Handler
-
- io.quarkus.runtime.logging.LogMetricsHandler
-
public class LogMetricsHandler extends Handler
Measures the number of log messages based on logger configurations quarkus.log.level and quarkus.log.category.*.levelIt 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) NavigableMap<Integer,LongAdder>
logCounters
-
Constructor Summary
Constructors Constructor Description LogMetricsHandler(NavigableMap<Integer,LongAdder> logCounters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
void
publish(LogRecord record)
-
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
-
-
-
-
Field Detail
-
logCounters
final NavigableMap<Integer,LongAdder> logCounters
-
-
Constructor Detail
-
LogMetricsHandler
public LogMetricsHandler(NavigableMap<Integer,LongAdder> logCounters)
-
-
Method Detail
-
close
public void close() throws SecurityException
- Specified by:
close
in classHandler
- Throws:
SecurityException
-
-