KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > log4j > lf5 > PassingLogRecordFilter


1 /*
2  * Copyright 1999-2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.log4j.lf5;
17
18
19 /**
20  * An implementation of LogRecordFilter which always returns true.
21  *
22  * @author Richard Wan
23  */

24
25 // Contributed by ThoughtWorks Inc.
26

27 public class PassingLogRecordFilter implements LogRecordFilter {
28   //--------------------------------------------------------------------------
29
// Constants:
30
//--------------------------------------------------------------------------
31

32   //--------------------------------------------------------------------------
33
// Protected Variables:
34
//--------------------------------------------------------------------------
35

36   //--------------------------------------------------------------------------
37
// Private Variables:
38
//--------------------------------------------------------------------------
39

40   //--------------------------------------------------------------------------
41
// Constructors:
42
//--------------------------------------------------------------------------
43

44   //--------------------------------------------------------------------------
45
// Public Methods:
46
//--------------------------------------------------------------------------
47

48   /**
49    * @return true;
50    */

51   public boolean passes(LogRecord record) {
52     return true;
53   }
54
55   /**
56    * Does nothing.
57    */

58   public void reset() {
59     // do nothing
60
}
61   //--------------------------------------------------------------------------
62
// Protected Methods:
63
//--------------------------------------------------------------------------
64

65   //--------------------------------------------------------------------------
66
// Private Methods:
67
//--------------------------------------------------------------------------
68

69   //--------------------------------------------------------------------------
70
// Nested Top-Level Classes or Interfaces
71
//--------------------------------------------------------------------------
72
}
73
74
Popular Tags