~ubuntu-branches/ubuntu/utopic/libisrt-java/utopic

« back to all changes in this revision

Viewing changes to src/de/intarsys/tools/logging/ThreadFilter.java

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2011-08-31 17:16:54 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: package-import@ubuntu.com-20110831171654-nf7kfumpuu7se5bf
Tags: upstream-4.8.20100629
ImportĀ upstreamĀ versionĀ 4.8.20100629

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package de.intarsys.tools.logging;
2
 
 
3
 
import java.util.logging.Filter;
4
 
import java.util.logging.LogRecord;
5
 
 
6
 
public class ThreadFilter implements Filter {
7
 
 
8
 
        final private Thread thread;
9
 
 
10
 
        public ThreadFilter() {
11
 
                this(Thread.currentThread());
12
 
        }
13
 
 
14
 
        public ThreadFilter(Thread thread) {
15
 
                super();
16
 
                this.thread = thread;
17
 
        }
18
 
 
19
 
        public boolean isLoggable(LogRecord record) {
20
 
                return thread == Thread.currentThread();
21
 
        }
22
 
 
23
 
}