Class QuarkusDelayedHandler

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable, org.jboss.logmanager.handlers.FlushableCloseable

    public class QuarkusDelayedHandler
    extends org.jboss.logmanager.ExtHandler
    A handler that queues messages until it's at least one child handler is added or set. If the children handlers are cleared then the handler is no longer considered activated and messages will once again be queued.
    • Field Detail

      • QUARKUS_LOG_MAX_STARTUP_RECORDS

        public static final String 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:
        Constant Field Values
    • Constructor Detail

      • QuarkusDelayedHandler

        public QuarkusDelayedHandler()
      • QuarkusDelayedHandler

        public QuarkusDelayedHandler​(int queueLimit)
    • Method Detail

      • doPublish

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

        public Handler[] setHandlers​(Handler[] newHandlers)
                              throws SecurityException

        Note that once this is invoked the handler will be activated and the messages will no longer be queued.

        Overrides:
        setHandlers in class org.jboss.logmanager.ExtHandler
        Throws:
        SecurityException
      • addLoggingCloseTask

        public void addLoggingCloseTask​(Runnable runnable)
      • buildTimeComplete

        public void buildTimeComplete()
      • removeHandler

        public void removeHandler​(Handler handler)
                           throws SecurityException

        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 class org.jboss.logmanager.ExtHandler
        Throws:
        SecurityException
        See Also:
        clearHandlers()
      • 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 of false 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, otherwise false