1 |
/** |
2 |
* Log <br> <br> |
3 |
* |
4 |
* This interface defines a standard by which Log implementations |
5 |
* will follow. This is so that the server need only know about a |
6 |
* Log, and not worry about whether it's actually using a FileLog |
7 |
* or a ScreenLog etc. This enables more logging implementations |
8 |
* to be made with ease at a later date if needed. <br> <br> |
9 |
* |
10 |
* Revision History: <br> |
11 |
* 1.2 - Tidied javadoc comments [26/04/00] <br> |
12 |
* 1.1 - Used an interface to create seperate File & Screen logs [15/03/00] <br> |
13 |
* 1.0 - Original File-only version <br> |
14 |
* |
15 |
* @author T.D.Bishop [tdb1@ukc.ac.uk] |
16 |
* @version 1.2, 26/04/2000 |
17 |
*/ |
18 |
public interface Log { |
19 |
|
20 |
/** |
21 |
* The write() method writes a line of text to the logging |
22 |
* destination. The method is passed the source object, |
23 |
* usually `this', which is neatly prepended to the line |
24 |
* along with the date. |
25 |
* |
26 |
* @param source Should be a reference to the class writing the line. |
27 |
* @param input The line of text to be logged.0 |
28 |
*/ |
29 |
public void write(Object source, String input); |
30 |
|
31 |
/** |
32 |
* The close() method closes the logging destination. After |
33 |
* closing any write attempts will be blocked. |
34 |
*/ |
35 |
public void close(); |
36 |
|
37 |
/** |
38 |
* The clear() method will clear the logging destination if |
39 |
* the implementation allows it. |
40 |
*/ |
41 |
public void clear(); |
42 |
|
43 |
} |