blob: a2e6df9fba521316e30a99ce740480677ff8bb50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/*************************************************
*
* = PACKAGE
* netsvcs.Logger
*
* = FILENAME
* LogMessageReceiver.java
*
*@author Everett Anderson
*
*************************************************/
package netsvcs.Logger;
import java.lang.*;
import java.io.*;
import netsvcs.Logger.LogRecord;
/**
*
* <p><h2>DESCRIPTION</h2>
*
* <blockquote>
* The LogMessageReceiver removes the code that handles a log message from
* the logging service acceptor. The DefaultLMR simply calls the LogRecord's
* print method. Other implementations of this interface can be built and
* given to the ServerLoggingAcceptor to change the result.
*
* @see netsvcs.Logger.ServerLoggingAcceptor, netsvcs.Logger.LogRecord
*/
public interface LogMessageReceiver
{
public void logRecord (String hostname,
LogRecord record);
};
class DefaultLMR implements LogMessageReceiver
{
public void logRecord (String hostname,
LogRecord record)
{
record.print(hostname, true, System.err);
}
}
|