changeset 1503:74c534de211f

use InheritableThreadLocal in ThreadLocalAppender
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 10 May 2020 23:28:16 -0600
parents 8a7b6b32c691
children f443542d8650
files src/goodjava/logger/ThreadLocalAppender.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
diff -r 8a7b6b32c691 -r 74c534de211f src/goodjava/logger/ThreadLocalAppender.java
--- a/src/goodjava/logger/ThreadLocalAppender.java	Sun May 10 22:48:15 2020 -0600
+++ b/src/goodjava/logger/ThreadLocalAppender.java	Sun May 10 23:28:16 2020 -0600
@@ -3,7 +3,7 @@
 
 public final class ThreadLocalAppender implements Appender {
 	public volatile Appender defaultAppender;
-	public final ThreadLocal<Appender> threadLocal = new ThreadLocal<Appender>();
+	public final ThreadLocal<Appender> threadLocal = new InheritableThreadLocal<Appender>();
 
 	public ThreadLocalAppender(Appender defaultAppender) {
 		this.defaultAppender = defaultAppender;