View Javadoc

1    /*
2    Copyright (c) 2005, CodeSmarts
3     All rights reserved.
4   
5    Redistribution and use in source and binary forms, with or without
6    modification, are permitted provided that the following conditions are
7    met:
8    	* 	Redistributions of source code must retain the above copyright
9    notice, this list of conditions and the following disclaimer.
10   	* 	Redistributions in binary form must reproduce the above
11   copyright notice, this list of conditions and the following disclaimer
12   in the documentation and/or other materials provided with the
13   distribution.
14   	* 	Neither the name of the CodeSmarts nor the names of its
15   contributors may be used to endorse or promote products derived from
16   this software without specific prior written permission.
17  
18   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
19   IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20   TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21   PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
22   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29   */
30  
31  package net.codesmarts.log4j;
32  
33  import org.apache.log4j.Priority;
34  
35  /***
36   *
37   * @author Fred McCann
38   */
39  public interface BugReportAppender {
40      
41      /***
42       * Append a bug report
43       */
44      public void append(BugReport report);    
45      
46      /***
47       * Get the priority required to trigger a bug report
48       */
49      public Priority getThresholdPriority();
50  
51      /***
52       * Get the buffer size required to trigger a bug report
53       */
54      public int getThresholdSize();
55  
56      /***
57       * Get the maximum buffer size
58       */
59      public int getMaxSize();    
60      
61      /***
62       * Get the hash method used by this appender
63       */
64      public int getHashMethod();        
65      
66      /***
67       * This returns true if this appender is configured to file duplicate reports. This defaults
68       * to false
69       * @return Returns the reportDuplicates.
70       */
71      public boolean isReportDuplicates();
72                  
73  }