1616 */
1717package org .apache .logging .log4j .core .async ;
1818
19+ import aQute .bnd .annotation .baseline .BaselineIgnore ;
1920import com .lmax .disruptor .EventTranslatorVararg ;
2021import com .lmax .disruptor .dsl .Disruptor ;
2122import java .util .List ;
6263 * and they will flush to disk at the end of each batch. This means that even with immediateFlush=false, there will
6364 * never be any items left in the buffer; all log events will all be written to disk in a very efficient manner.
6465 */
66+ // This constructor is effectively package-private, since {@link AsyncLoggerDisruptor} is package-private.
67+ @ BaselineIgnore ("2.24.3" )
6568public class AsyncLogger extends Logger implements EventTranslatorVararg <RingBufferLogEvent > {
6669 // Implementation note: many methods in this class are tuned for performance. MODIFY WITH CARE!
6770 // Specifically, try to keep the hot methods to 35 bytecodes or less:
@@ -85,16 +88,14 @@ public class AsyncLogger extends Logger implements EventTranslatorVararg<RingBuf
8588
8689 /**
8790 * Constructs an {@code AsyncLogger} with the specified context, name and message factory.
88- * <p>
89- * This method is effectively package-private, since {@link AsyncLoggerDisruptor} is package-private.
90- * </p>
91+ *
9192 * @param context The {@link LoggerContext} this logger is associated with, never {@code null}.
9293 * @param name The logger name, never {@code null}.
9394 * @param messageFactory The message factory to be used.
9495 * Passing a {@code null} value is deprecated, but supported for backward compatibility.
9596 * @param loggerDisruptor Helper class that logging can be delegated to. This object owns the Disruptor.
9697 */
97- public AsyncLogger (
98+ AsyncLogger (
9899 LoggerContext context , String name , MessageFactory messageFactory , AsyncLoggerDisruptor loggerDisruptor ) {
99100 super (context , name , messageFactory );
100101 this .loggerDisruptor = loggerDisruptor ;
@@ -145,7 +146,7 @@ public void log(
145146 getTranslatorType ().log (fqcn , location , level , marker , message , throwable );
146147 }
147148
148- abstract class TranslatorType {
149+ abstract static class TranslatorType {
149150 abstract void log (
150151 final String fqcn ,
151152 final StackTraceElement location ,
@@ -400,7 +401,7 @@ private void logWithVarargTranslator(
400401 if (!isReused (message )) {
401402 InternalAsyncUtil .makeMessageImmutable (message );
402403 }
403- StackTraceElement location = null ;
404+ StackTraceElement location ;
404405 // calls the translateTo method on this AsyncLogger
405406 if (!disruptor
406407 .getRingBuffer ()
0 commit comments