1
/* ========================================================================
2
* JCommon : a free general purpose class library for the Java(tm) platform
3
* ========================================================================
5
* (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
7
* Project Info: http://www.jfree.org/jcommon/index.html
9
* This library is free software; you can redistribute it and/or modify it
10
* under the terms of the GNU Lesser General Public License as published by
11
* the Free Software Foundation; either version 2.1 of the License, or
12
* (at your option) any later version.
14
* This library is distributed in the hope that it will be useful, but
15
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17
* License for more details.
19
* You should have received a copy of the GNU Lesser General Public
20
* License along with this library; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
24
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
25
* in the United States and other countries.]
30
* (C)opyright 2002-2004, by Object Refinery Limited.
32
* $Id: LogTarget.java,v 1.3 2005/11/14 10:55:59 mungady Exp $
36
* 11-May-2002 : Initial version
37
* 06-Dec-2002 : LogTargets now use Object-Parameters instead of Strings.
38
* 05-Feb-2003 : Removed unnecessary methods.
39
* 29-Apr-2003 : Distilled from the JFreeReport project and moved into JCommon
43
package org.jfree.util;
46
* An interface that defines a log target (a consumer of log messages). Classes which
47
* implement this interface can be registered with the {@link org.jfree.util.Log} class
48
* and will then receive logging messages generated by the code.
50
* @author Thomas Morgner
52
public interface LogTarget {
57
public static final int ERROR = 0;
62
public static final int WARN = 1;
67
public static final int INFO = 2;
72
public static final int DEBUG = 3;
74
/** Strings for the log levels. */
75
public static final String[] LEVELS =
84
* Logs a message at a specified log level.
86
* @param level the log level.
87
* @param message the log message.
89
public void log(int level, Object message);
92
* Logs a message at a specified log level.
94
* @param level the log level.
95
* @param message the log message.
96
* @param e the exception
98
public void log(int level, Object message, Exception e);