comparison src/goodjava/logger/GoodLogger.java @ 1450:28b1ddacfad3

logger work
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 01 Mar 2020 13:47:02 -0700
parents 6fc083e1d08c
children 329197048ff0
comparison
equal deleted inserted replaced
1449:dd14d2dce7ee 1450:28b1ddacfad3
3 import goodjava.logging.Logger; 3 import goodjava.logging.Logger;
4 4
5 5
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 = Level.INFO; 8 public volatile int level;
9 public volatile Appender appender = DEFAULT_APPENDER; 9 public volatile Appender appender;
10 10
11 GoodLogger(String name) { 11 GoodLogger(String name) {
12 this.name = name; 12 this.name = name;
13 } 13 }
14 14
61 } 61 }
62 62
63 private boolean isEnabled(int level) { 63 private boolean isEnabled(int level) {
64 return true; 64 return true;
65 } 65 }
66
67
68 private static final Layout DEFAULT_LAYOUT
69 = new ListLayout(Layouts.LEVEL," - ",Layouts.MESSAGE,"\n",Layouts.THROWABLE);
70
71 private static final WriterAppender DEFAULT_APPENDER = new ConsoleAppender(DEFAULT_LAYOUT,System.err);
72 } 66 }