01: /*
02: * $Id: RootLogDevice.java,v 1.5 2002/09/16 08:05:02 jkl Exp $
03: *
04: * Copyright (c) 2002 Njet Communications Ltd. All Rights Reserved.
05: *
06: * Use is subject to license terms, as defined in
07: * Anvil Sofware License, Version 1.1. See LICENSE
08: * file, or http://njet.org/license-1.1.txt
09: */
10: package anvil;
11:
12: import java.io.BufferedOutputStream;
13: import java.io.FileOutputStream;
14: import anvil.server.Zone;
15:
16: /**
17: * class RootLogDevice
18: *
19: * @author Jani Lehtimäki
20: */
21: public class RootLogDevice implements LogDevice {
22:
23: public static final RootLogDevice INSTANCE = new RootLogDevice();
24:
25: private LogLayout _layout = new anvil.server.basic.BasicLogLayout();
26:
27: public RootLogDevice() {
28: }
29:
30: public String toString() {
31: return "@stderr " + _layout.toString();
32: }
33:
34: public void initialize(Zone zone) {
35: }
36:
37: public void stop() {
38: }
39:
40: public void setLayout(LogLayout layout) {
41: }
42:
43: public void logEvent(LogEvent event) {
44: System.err.print(_layout.format(event));
45: }
46:
47: }
|