Mercurial Hosting > luan
annotate src/goodjava/logger/LevelAppender.java @ 1538:634f6765830e
use goodjava/lucene/logging
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 07 Aug 2020 21:42:16 -0600 |
parents | 85d7c1777357 |
children |
rev | line source |
---|---|
1449 | 1 package goodjava.logger; |
2 | |
3 | |
1451 | 4 public final class LevelAppender implements Appender { |
1449 | 5 private final Appender appender; |
6 private final int level; | |
7 | |
8 public LevelAppender(Appender appender,int level) { | |
9 this.appender = appender; | |
10 this.level = level; | |
11 } | |
12 | |
13 public void append(LoggingEvent event) { | |
14 if( event.level >= this.level ) | |
15 appender.append(event); | |
16 } | |
17 | |
18 public void close() { | |
19 appender.close(); | |
20 } | |
21 } |