01: // You can redistribute this software and/or modify it under the terms of
02: // the Ozone Library License version 1 published by ozone-db.org.
03: //
04: // The original code and portions created by SMB are
05: // Copyright (C) 1997-2000 by SMB GmbH. All rights reserved.
06: //
07: // $Id: LogWriter.java,v 1.2 2002/05/17 08:55:47 per_nyfelt Exp $
08:
09: package org.ozoneDB.util;
10:
11: import java.io.*;
12: import java.util.*;
13:
14: /**
15: * @author <a href="http://www.softwarebuero.de/">SMB</a>
16: * @version $Revision: 1.2 $Date: 2002/05/17 08:55:47 $
17: */
18: public interface LogWriter {
19:
20: public final static int FATAL = OzoneDebugLevel.FATAL_INT;
21: public final static int ERROR = OzoneDebugLevel.ERROR_INT;
22: public final static int WARN = OzoneDebugLevel.WARN_INT;
23: public final static int INFO = OzoneDebugLevel.INFO_INT;
24: public final static int DEBUG = OzoneDebugLevel.DEBUG_INT;
25: public final static int DEBUG1 = OzoneDebugLevel.DEBUG1_INT;
26: public final static int DEBUG2 = OzoneDebugLevel.DEBUG2_INT;
27: public final static int DEBUG3 = OzoneDebugLevel.DEBUG3_INT;
28:
29: /**
30: * This method allows to quickly find out if there is any log target that
31: * would receive entries of the specified level.
32: */
33: public boolean hasTarget(int level);
34:
35: public void addLogTarget(String name, OutputStream _out, int _level);
36:
37: public void addLogTarget(PrintWriter _writer, int _level,
38: String name);
39:
40: public void newEntry(Object sender, String msg, int level);
41:
42: public void newEntry(Object sender, String msg, Throwable e,
43: int level);
44: }
|