Skip to content
Permalink
Browse files

[FIXED JENKINS-15226] Log recorders do not work reliably.

(cherry picked from commit f9583b8)
  • Loading branch information
jglick authored and vjuranek committed Oct 23, 2012
1 parent be6d2cc commit 17f7145bdba58ae6e0dc52f99349357611e5831d
Showing with 8 additions and 1 deletion.
  1. +3 −0 changelog.html
  2. +5 −1 core/src/main/java/hudson/logging/LogRecorder.java
@@ -55,6 +55,9 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
Log recorders do not work reliably.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-15226">issue 15226</a>)
<li class=>
</ul>
</div><!--=TRUNK-END=-->
@@ -87,6 +87,7 @@ public void publish(LogRecord record) {
public static final class Target {
public final String name;
private final int level;
private transient /* almost final*/ Logger logger;

public Target(String name, Level level) {
this(name,level.intValue());
@@ -118,7 +119,10 @@ public boolean includes(LogRecord r) {
}

public Logger getLogger() {
return Logger.getLogger(name);
if (logger == null) {
logger = Logger.getLogger(name);
}
return logger;
}

/**

0 comments on commit 17f7145

Please sign in to comment.
You can’t perform that action at this time.