Class ConseqWriterGroup

  • All Implemented Interfaces:
    Stoppable, Stoppable.Process, LogWriter, PerformanceSensitive

    public class ConseqWriterGroup
    extends Object
    implements LogWriter, Stoppable.Process
    In general, log events are asynchronously written/rendered in parallel by multiple concurrent threads. However, events issued by the same caller application thread are rendered sequentially with the ConseqExecutor API. Thus, logs by different caller threads may arrive at the final destination (e.g. system Console or a log file) in any order; meanwhile, logs from the same caller thread will arrive sequentially in the same order as they are called in the orginal thread.
    • Method Detail

      • from

        @NonNull
        public static @NonNull ConseqWriterGroup from​(LogServiceConfiguration logServiceConfiguration)
        Parameters:
        logServiceConfiguration - entire configuration
        Returns:
        the composite writer containing all writers configured in the specified properties
      • getMinimumOutputLevel

        public elf4j.Level getMinimumOutputLevel()
        Specified by:
        getMinimumOutputLevel in interface LogWriter
        Returns:
        the minimum output level of this writer
      • write

        public void write​(LogEvent logEvent)
        Specified by:
        write in interface LogWriter
        Parameters:
        logEvent - the log data entry to write out
      • includeCallerDetail

        public boolean includeCallerDetail()
        Specified by:
        includeCallerDetail in interface PerformanceSensitive
        Returns:
        true if log should include caller detail such as method, line number...
      • includeCallerThread

        public boolean includeCallerThread()
        Specified by:
        includeCallerThread in interface PerformanceSensitive
        Returns:
        true if log should include call thread information such thread name and id
      • stop

        public void stop()
        Specified by:
        stop in interface Stoppable
      • isStopped

        public boolean isStopped()
        Specified by:
        isStopped in interface Stoppable
        Returns:
        true if the instance has stopped