001: /**
002: * Objective Database Abstraction Layer (ODAL)
003: * Copyright (c) 2004, The ODAL Development Group
004: * All rights reserved.
005: * For definition of the ODAL Development Group please refer to LICENCE.txt file
006: *
007: * Distributable under LGPL license.
008: * See terms of license at gnu.org.
009: */package com.completex.objective.components.log.adapter;
010:
011: import com.completex.objective.components.log.Log;
012: import com.completex.objective.components.log.LogConsts;
013:
014: /**
015: * Commons logger wrapper
016: *
017: * @see Log
018: *
019: * @author Gennady Krizhevsky
020: */
021: public class LoggingLogImpl implements Log, LogConsts {
022:
023: private org.apache.commons.logging.Log logger;
024:
025: public LoggingLogImpl(org.apache.commons.logging.Log logger) {
026: this .logger = logger;
027: }
028:
029: public boolean isTraceEnabled() {
030: return logger.isTraceEnabled();
031: }
032:
033: public void setTraceEnabled(boolean traceEnabled) {
034: throw new UnsupportedOperationException();
035: }
036:
037: public boolean isDebugEnabled() {
038: return logger.isDebugEnabled();
039: }
040:
041: public void setDebugEnabled(boolean debugEnabled) {
042: throw new UnsupportedOperationException();
043: }
044:
045: public boolean isInfoEnabled() {
046: return logger.isInfoEnabled();
047: }
048:
049: public void setInfoEnabled(boolean infoEnabled) {
050: throw new UnsupportedOperationException();
051: }
052:
053: public boolean isWarnEnabled() {
054: return logger.isWarnEnabled();
055: }
056:
057: public void setWarnEnabled(boolean warnEnabled) {
058: throw new UnsupportedOperationException();
059: }
060:
061: public boolean isErrorEnabled() {
062: return logger.isErrorEnabled();
063: }
064:
065: public void setErrorEnabled(boolean errorEnabled) {
066: throw new UnsupportedOperationException();
067: }
068:
069: public boolean isFatalEnabled() {
070: return logger.isFatalEnabled();
071: }
072:
073: public void setFatalEnabled(boolean fatalEnabled) {
074: throw new UnsupportedOperationException();
075: }
076:
077: public void trace(Object o) {
078: logger.trace(o, null);
079: }
080:
081: public void trace(Object o, Throwable throwable) {
082: logger.trace(o, throwable);
083: }
084:
085: public void debug(Object s, Throwable throwable) {
086: logger.debug(s, throwable);
087: }
088:
089: public void debug(Object s) {
090: logger.debug(s, null);
091: }
092:
093: public void info(Object s, Throwable throwable) {
094: logger.info(s, throwable);
095: }
096:
097: public void info(Object s) {
098: logger.info(s, null);
099: }
100:
101: public void warn(Object s, Throwable throwable) {
102: logger.warn(s, throwable);
103: }
104:
105: public void warn(Object s) {
106: logger.warn(s, null);
107: }
108:
109: public void error(Object s, Throwable throwable) {
110: logger.error(s, throwable);
111: }
112:
113: public void error(Object s) {
114: logger.error(s, null);
115: }
116:
117: public void fatal(Object s, Throwable throwable) {
118: logger.fatal(s, null);
119: }
120:
121: public void fatal(Object s) {
122: logger.fatal(s, null);
123: }
124: }
|