Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: s IT Solutions AT Spardat GmbH - initial API and implementation /
 
 
 /*
  * @(#) $Id: XmaBrtLogger.java 2084 2007-11-27 14:53:31Z s3460 $
  */
 package at.spardat.xma.boot.logger;
 
Implementation of the org.apache.commons.logging.Log interface that wraps the XMA Bootruntime Logger Implementation

This class is used to pipe log entries produced by the cookie implementation of apache httpClient into the logfile of XMA Bootruntime.

Author(s):
Bernhard Gruber
 
 public class XmaBrtLogger implements Log {

    
allow/disallow tracing
 
     private static boolean traceEnabled=false;

    
The underlying Logger implementation we are using.
 
     protected transient Logger logger = null;


    
The name of the logger we are wrapping.
 
     protected String name = null;


    
Construct a named instance of this Logger.

Parameters:
name Name of the logger to be constructed
 
     public XmaBrtLogger(String name) {
         this. = name;
          = getLogger();
     }

    
Logs a message with java.util.logging.Level.FINE.

Parameters:
message to log
See also:
org.apache.commons.logging.Log.debug(java.lang.Object)
 
     public void debug(Object message) {
         .log(., String.valueOf(message));
     }


    
Logs a message with java.util.logging.Level.FINE.

Parameters:
message to log
exception log this cause
See also:
org.apache.commons.logging.Log.debug(java.lang.Object,java.lang.Throwable)
 
     public void debug(Object messageThrowable exception) {
         .log(., String.valueOf(message), exception);
     }


    
Logs a message with java.util.logging.Level.SEVERE.

Parameters:
message to log
See also:
org.apache.commons.logging.Log.error(java.lang.Object)
 
     public void error(Object message) {
         .log(., String.valueOf(message));
     }


    
Logs a message with java.util.logging.Level.SEVERE.

Parameters:
message to log
exception log this cause
See also:
org.apache.commons.logging.Log.error(java.lang.Object,java.lang.Throwable)
 
     public void error(Object messageThrowable exception) {
         .log(., String.valueOf(message), exception);
     }


    
Logs a message with java.util.logging.Level.SEVERE.

Parameters:
message to log
See also:
org.apache.commons.logging.Log.fatal(java.lang.Object)
    public void fatal(Object message) {
        .log(., String.valueOf(message));
    }


    
Logs a message with java.util.logging.Level.SEVERE.

Parameters:
message to log
exception log this cause
See also:
org.apache.commons.logging.Log.fatal(java.lang.Object,java.lang.Throwable)
    public void fatal(Object messageThrowable exception) {
        .log(., String.valueOf(message), exception);
    }


    
Return the native Logger instance we are using.
    public Logger getLogger() {
        if ( == null) {
             = Logger.getLogger();
        }
        return ;
    }


    
Logs a message with java.util.logging.Level.INFO.

Parameters:
message to log
See also:
org.apache.commons.logging.Log.info(java.lang.Object)
    public void info(Object message) {
        .log(., String.valueOf(message));
    }


    
Logs a message with java.util.logging.Level.INFO.

Parameters:
message to log
exception log this cause
See also:
org.apache.commons.logging.Log.info(java.lang.Object,java.lang.Throwable)
    public void info(Object messageThrowable exception) {
        .log(., String.valueOf(message), exception);
    }


    
Is debug logging currently enabled?
    public boolean isDebugEnabled() {
        return .getLevel().intValue() <= ..intValue();
    }


    
Is error logging currently enabled?
    public boolean isErrorEnabled() {
        return .getLevel().intValue() <= ..intValue();
    }


    
Is fatal logging currently enabled?
    public boolean isFatalEnabled() {
        return .getLevel().intValue() <= ..intValue();
    }


    
Is info logging currently enabled?
    public boolean isInfoEnabled() {
        return .getLevel().intValue() <= ..intValue();
    }


    
Is trace logging currently enabled?
    public boolean isTraceEnabled() {
        return  && (.getLevel().intValue() <= ..intValue());
    }


    
Is warn logging currently enabled?
    public boolean isWarnEnabled() {
        return .getLevel().intValue() <= ..intValue();
    }


    
Logs a message with java.util.logging.Level.ALL.

Parameters:
message to log
See also:
org.apache.commons.logging.Log.trace(java.lang.Object)
    public void trace(Object message) {
        if() {
            .log(., String.valueOf(message));
        }
    }


    
Logs a message with java.util.logging.Level.ALL.

Parameters:
message to log
exception log this cause
See also:
org.apache.commons.logging.Log.trace(java.lang.Object,java.lang.Throwable)
    public void trace(Object messageThrowable exception) {
        if() {
            .log(., String.valueOf(message), exception);
        }
    }


    
Logs a message with java.util.logging.Level.WARNING.

Parameters:
message to log
See also:
org.apache.commons.logging.Log.warn(java.lang.Object)
    public void warn(Object message) {
        .log(., String.valueOf(message));
    }


    
Logs a message with java.util.logging.Level.WARNING.

Parameters:
message to log
exception log this cause
See also:
org.apache.commons.logging.Log.warn(java.lang.Object,java.lang.Throwable)
    public void warn(Object messageThrowable exception) {
        .log(., String.valueOf(message), exception);
    }
New to GrepCode? Check out our FAQ X