comparison src/goodjava/logger/GoodLogger.java @ 1594:329197048ff0

add DailyRollingFileAppender
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 21 Mar 2021 00:59:58 -0600
parents 28b1ddacfad3
children
comparison
equal deleted inserted replaced
1593:ea62c2316b2e 1594:329197048ff0
6 public final class GoodLogger implements Logger { 6 public final class GoodLogger implements Logger {
7 public final String name; 7 public final String name;
8 public volatile int level; 8 public volatile int level;
9 public volatile Appender appender; 9 public volatile Appender appender;
10 10
11 GoodLogger(String name) { 11 public GoodLogger(String name) {
12 this.name = name; 12 this.name = name;
13 } 13 }
14 14
15 private void log(int level,String msg,Throwable t) { 15 private void log(int level,String msg,Throwable t) {
16 if( level < this.level ) 16 if( level < this.level )
59 @Override public boolean isDebugEnabled() { 59 @Override public boolean isDebugEnabled() {
60 return isEnabled(Level.DEBUG); 60 return isEnabled(Level.DEBUG);
61 } 61 }
62 62
63 private boolean isEnabled(int level) { 63 private boolean isEnabled(int level) {
64 return true; 64 return level >= this.level;
65 } 65 }
66 } 66 }