001: /*
002: * Copyright (C) The DNA Group. All rights reserved.
003: *
004: * This software is published under the terms of the DNA
005: * Software License version 1.1, a copy of which has been included
006: * with this distribution in the LICENSE.txt file.
007: */
008: package org.codehaus.dna;
009:
010: /**
011: * This interface was a facade for different Logger subsystems.
012: *
013: * @version $Revision: 1.2 $ $Date: 2004/05/01 09:51:48 $
014: */
015: public interface Logger {
016: /**
017: * Log a trace message.
018: *
019: * @param message the message
020: */
021: void trace(String message);
022:
023: /**
024: * Log a trace message with an associated throwable.
025: *
026: * @param message the message
027: * @param throwable the throwable
028: */
029: void trace(String message, Throwable throwable);
030:
031: /**
032: * Return true if a trace message will be logged.
033: *
034: * @return true if message will be logged
035: */
036: boolean isTraceEnabled();
037:
038: /**
039: * Log a debug message.
040: *
041: * @param message the message
042: */
043: void debug(String message);
044:
045: /**
046: * Log a debug message with an associated throwable.
047: *
048: * @param message the message
049: * @param throwable the throwable
050: */
051: void debug(String message, Throwable throwable);
052:
053: /**
054: * Return true if a debug message will be logged.
055: *
056: * @return true if message will be logged
057: */
058: boolean isDebugEnabled();
059:
060: /**
061: * Log a info message.
062: *
063: * @param message the message
064: */
065: void info(String message);
066:
067: /**
068: * Log a info message with an associated throwable.
069: *
070: * @param message the message
071: * @param throwable the throwable
072: */
073: void info(String message, Throwable throwable);
074:
075: /**
076: * Return true if an info message will be logged.
077: *
078: * @return true if message will be logged
079: */
080: boolean isInfoEnabled();
081:
082: /**
083: * Log a warn message.
084: *
085: * @param message the message
086: */
087: void warn(String message);
088:
089: /**
090: * Log a warn message with an associated throwable.
091: *
092: * @param message the message
093: * @param throwable the throwable
094: */
095: void warn(String message, Throwable throwable);
096:
097: /**
098: * Return true if a warn message will be logged.
099: *
100: * @return true if message will be logged
101: */
102: boolean isWarnEnabled();
103:
104: /**
105: * Log a error message.
106: *
107: * @param message the message
108: */
109: void error(String message);
110:
111: /**
112: * Log a error message with an associated throwable.
113: *
114: * @param message the message
115: * @param throwable the throwable
116: */
117: void error(String message, Throwable throwable);
118:
119: /**
120: * Return true if a error message will be logged.
121: *
122: * @return true if message will be logged
123: */
124: boolean isErrorEnabled();
125:
126: /**
127: * Get the child logger with specified name.
128: *
129: * @param name the name of child logger
130: * @return the child logger
131: */
132: Logger getChildLogger(String name);
133: }
|