001: package net.javacoding.jspider.core.logging.impl;
002:
003: /**
004: * Logger implementation that redirects all logged output to the
005: * console.
006: *
007: * $Id: SystemOutLogImpl.java,v 1.2 2003/03/27 17:44:05 vanrogu Exp $
008: *
009: * @author Günther Van Roey
010: */
011: public class SystemOutLogImpl extends BaseLogImpl {
012:
013: /**
014: * Worker method that logs the message to the Console.
015: * @param message
016: */
017: public void doLog(String message) {
018: System.out.println(message);
019: }
020:
021: public void doLog(Object o) {
022: doLog("" + o);
023: }
024:
025: public void doLog(Throwable t) {
026: doLog("" + t);
027: }
028:
029: public boolean isDebugEnabled() {
030: return true;
031: }
032:
033: public boolean isErrorEnabled() {
034: return true;
035: }
036:
037: public boolean isFatalEnabled() {
038: return true;
039: }
040:
041: public boolean isInfoEnabled() {
042: return true;
043: }
044:
045: public boolean isTraceEnabled() {
046: return true;
047: }
048:
049: public boolean isWarnEnabled() {
050: return true;
051: }
052:
053: public void trace(Object o) {
054: doLog(o);
055: }
056:
057: public void trace(Object o, Throwable throwable) {
058: doLog(o);
059: doLog(throwable);
060: }
061:
062: public void debug(Object o) {
063: doLog(o);
064: }
065:
066: public void debug(Object o, Throwable throwable) {
067: doLog(o);
068: doLog(throwable);
069: }
070:
071: public void info(Object o) {
072: doLog(o);
073: }
074:
075: public void info(Object o, Throwable throwable) {
076: doLog(o);
077: doLog(throwable);
078: }
079:
080: public void warn(Object o) {
081: doLog(o);
082: }
083:
084: public void warn(Object o, Throwable throwable) {
085: doLog(o);
086: doLog(throwable);
087: }
088:
089: public void error(Object o) {
090: doLog(o);
091: }
092:
093: public void error(Object o, Throwable throwable) {
094: doLog(o);
095: doLog(throwable);
096: }
097:
098: public void fatal(Object o) {
099: doLog(o);
100: }
101:
102: public void fatal(Object o, Throwable throwable) {
103: doLog(o);
104: doLog(throwable);
105: }
106:
107: }
|