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_r296563688
##########
File path:
log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
##########
@@ -2755,77 +2755,114 @@ public void warn(final String message, final Object
p0, final Object p1, final O
* @since 3.0
*/
@Override
- public LogBuilder atTrace() {
+ public LogBuilder trace() {
if (isTraceEnabled()) {
- return logBuilder.get().setLevel(Level.TRACE);
+ DefaultLogBuilder builder = logBuilder.get();
+ if (builder.isInUse()) {
+ return new DefaultLogBuilder(this);
Review comment:
Yes, unless a second constructor is added that accepts the level.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services