rgoers commented on a change in pull request #284: LOG4J2-2639 - Allow logging calls to be constructed using a builder pattern URL: https://github.com/apache/logging-log4j2/pull/284#discussion_r296492581
########## File path: log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java ########## @@ -2734,4 +2748,108 @@ public void warn(final String message, final Object p0, final Object p1, final O final Object p7, final Object p8, final Object p9) { logIfEnabled(FQCN, Level.WARN, null, message, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + + /** + * Constuct a trace log event. + * @return a LogBuilder. + * @since 3.0 + */ + @Override + public LogBuilder atTrace() { + if (isTraceEnabled()) { + return logBuilder.get().setLevel(Level.TRACE); Review comment: Ouch. I hadn't thought of that. That means the threadLocal will need to maintain a list of LogBuilders instead of just one. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services