Class QuarkusDelayedHandler
- All Implemented Interfaces:
Flushable
,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
This is a system property that can be used to help debug startup issues if TRACE and DEBUG logs are being dropped due to the queue limit being exceeded.Fields inherited from class org.jboss.logmanager.ExtHandler
handlers, handlersUpdater, lock
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHandler
(Handler handler) void
addLoggingCloseTask
(Runnable runnable) void
Handler[]
final void
close()
protected void
doPublish
(org.jboss.logmanager.ExtLogRecord record) final boolean
Indicates whether or not this handler has been activated.boolean
void
removeHandler
(Handler handler) Handler[]
setBuildTimeHandlers
(Handler[] newHandlers) void
setCallerCalculationRequired
(boolean callerCalculationRequired) Sets whether or not caller information will be required when formatting records.Handler[]
setHandlers
(Handler[] newHandlers) Methods inherited from class org.jboss.logmanager.ExtHandler
checkAccess, checkAccess, flush, getCharset, getEncoding, getErrorManager, getFilter, getFormatter, getHandlers, getLevel, isAutoFlush, isCloseChildren, isEnabled, publish, publish, publishToNestedHandlers, reportError, reportError, setAutoFlush, setCharset, setCharsetPrivate, setCloseChildren, setEnabled, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
Methods inherited from class java.util.logging.Handler
isLoggable
-
Field Details
-
QUARKUS_LOG_MAX_STARTUP_RECORDS
This is a system property that can be used to help debug startup issues if TRACE and DEBUG logs are being dropped due to the queue limit being exceeded. This is not a normal config property, and is unlikely to be needed under normal usage.- See Also:
-
-
Constructor Details
-
QuarkusDelayedHandler
public QuarkusDelayedHandler() -
QuarkusDelayedHandler
public QuarkusDelayedHandler(int queueLimit)
-
-
Method Details
-
doPublish
protected void doPublish(org.jboss.logmanager.ExtLogRecord record) - Overrides:
doPublish
in classorg.jboss.logmanager.ExtHandler
-
close
- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classorg.jboss.logmanager.ExtHandler
- Throws:
SecurityException
-
addHandler
Note that once this is invoked the handler will be activated and the messages will no longer be queued. If more than one child handler is required the
setHandlers(Handler[])
should be used.- Overrides:
addHandler
in classorg.jboss.logmanager.ExtHandler
- Throws:
SecurityException
- See Also:
-
setHandlers
Note that once this is invoked the handler will be activated and the messages will no longer be queued.
- Overrides:
setHandlers
in classorg.jboss.logmanager.ExtHandler
- Throws:
SecurityException
-
addLoggingCloseTask
-
setBuildTimeHandlers
- Throws:
SecurityException
-
buildTimeComplete
public void buildTimeComplete() -
removeHandler
Note that if the last child handler is removed the handler will no longer be activated and the messages will again be queued.
- Overrides:
removeHandler
in classorg.jboss.logmanager.ExtHandler
- Throws:
SecurityException
- See Also:
-
clearHandlers
Note that once this is invoked the handler will no longer be activated and messages will again be queued.
- Overrides:
clearHandlers
in classorg.jboss.logmanager.ExtHandler
- Throws:
SecurityException
- See Also:
-
isCallerCalculationRequired
public boolean isCallerCalculationRequired()This can be overridden to always require the caller calculation by setting the
setCallerCalculationRequired(boolean)
value totrue
.- Overrides:
isCallerCalculationRequired
in classorg.jboss.logmanager.ExtHandler
- See Also:
-
setCallerCalculationRequired
public void setCallerCalculationRequired(boolean callerCalculationRequired) Sets whether or not caller information will be required when formatting records.If set to
true
the caller information will be calculated for each record that is placed in the queue. A value offalse
means the {@link super#isCallerCalculationRequired()} will be used.Note that the caller information is only attempted to be calculated when the handler has not been activated. Once activated it's up to the children handlers to determine how the record is processed.
- Parameters:
callerCalculationRequired
-true
if the caller information should always be calculated before the record is being placed in the queue
-
isActivated
public final boolean isActivated()Indicates whether or not this handler has been activated.- Returns:
true
if the handler has been activated, otherwisefalse
-