001: package org.apache.maven.embedder;
002:
003: /*
004: * Licensed to the Apache Software Foundation (ASF) under one
005: * or more contributor license agreements. See the NOTICE file
006: * distributed with this work for additional information
007: * regarding copyright ownership. The ASF licenses this file
008: * to you under the Apache License, Version 2.0 (the
009: * "License"); you may not use this file except in compliance
010: * with the License. You may obtain a copy of the License at
011: *
012: * http://www.apache.org/licenses/LICENSE-2.0
013: *
014: * Unless required by applicable law or agreed to in writing,
015: * software distributed under the License is distributed on an
016: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017: * KIND, either express or implied. See the License for the
018: * specific language governing permissions and limitations
019: * under the License.
020: */
021:
022: import org.codehaus.plexus.logging.Logger;
023:
024: /**
025: * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
026: * @version $Id: PlexusLoggerAdapter.java 513028 2007-02-28 22:50:21Z jvanzyl $
027: */
028: public class PlexusLoggerAdapter implements Logger {
029: private MavenEmbedderLogger logger;
030:
031: public PlexusLoggerAdapter(MavenEmbedderLogger logger) {
032: this .logger = logger;
033: }
034:
035: public void debug(String message) {
036: logger.debug(message);
037: }
038:
039: public void debug(String message, Throwable throwable) {
040: logger.debug(message, throwable);
041: }
042:
043: public boolean isDebugEnabled() {
044: return logger.isDebugEnabled();
045: }
046:
047: public void info(String message) {
048: logger.info(message);
049: }
050:
051: public void info(String message, Throwable throwable) {
052: logger.info(message, throwable);
053: }
054:
055: public boolean isInfoEnabled() {
056: return logger.isInfoEnabled();
057: }
058:
059: public void warn(String message) {
060: logger.warn(message);
061: }
062:
063: public void warn(String message, Throwable throwable) {
064: logger.warn(message, throwable);
065: }
066:
067: public boolean isWarnEnabled() {
068: return logger.isWarnEnabled();
069: }
070:
071: public void error(String message) {
072: logger.error(message);
073: }
074:
075: public void error(String message, Throwable throwable) {
076: logger.error(message, throwable);
077: }
078:
079: public boolean isErrorEnabled() {
080: return logger.isErrorEnabled();
081: }
082:
083: public void fatalError(String message) {
084: logger.fatalError(message);
085: }
086:
087: public void fatalError(String message, Throwable throwable) {
088: logger.fatalError(message, throwable);
089: }
090:
091: public boolean isFatalErrorEnabled() {
092: return logger.isFatalErrorEnabled();
093: }
094:
095: public void setThreshold(int i) {
096: logger.setThreshold(i);
097: }
098:
099: public int getThreshold() {
100: return logger.getThreshold();
101: }
102:
103: public String getName() {
104: return toString();
105: }
106:
107: public Logger getChildLogger(String name) {
108: return this;
109: }
110: }
|