Example usage for org.apache.commons.logging Log info

List of usage examples for org.apache.commons.logging Log info

Introduction

In this page you can find the example usage for org.apache.commons.logging Log info.

Prototype

void info(Object message, Throwable t);

Source Link

Document

Logs an error with info log level.

Usage

From source file:com.alibaba.wasp.jdbc.Logger.java

/**
* Log an exception and convert it to a SQL exception if required.
*
* @param ex// www.  ja  v a  2 s  .co m
*          the exception
* @return the SQL exception object
*/
public static SQLException logAndConvert(Log log, Exception ex) {
    SQLException e = JdbcException.toSQLException(ex);
    int errorCode = e.getErrorCode();
    if (errorCode >= 23000 && errorCode < 24000) {
        log.info("exception", e);
    } else {
        log.error("exception", e);
    }
    return e;
}

From source file:com.buffalokiwi.api.APILog.java

/**
 * Log an error with info log level./*from w w w  .jav  a 2  s  .  co  m*/
 *
 * @param log Log to write to
 * @param message log this message
 * @param t log this cause
 */
public static void info(final Log log, final Throwable t, final Object... message) {
    if (log.isInfoEnabled())
        log.info(concat(message), t);
}

From source file:net.gleamynode.netty2.SessionLog.java

public static void info(Log log, Session session, Object obj, Throwable cause) {
    log.info(getMessage(session, obj), cause);
}

From source file:edu.umn.msi.tropix.common.logging.ExceptionUtils.java

public static void logQuietly(final Log log, final Throwable t, final String message) {
    if (message != null) {
        log.warn(message);/*  w  ww .j  a va2 s . c  o  m*/
    }
    log.info("Exception Info : ", t);
}

From source file:com.datos.vfs.VfsLog.java

/**
 * info./* w  ww.ja v  a  2  s.c  om*/
 * @param vfslog The base component Logger to use.
 * @param commonslog The class specific Logger
 * @param message The message to log.
 * @param t The exception, if any.
 */
public static void info(final Log vfslog, final Log commonslog, final String message, final Throwable t) {
    if (vfslog != null) {
        vfslog.info(message, t);
    } else if (commonslog != null) {
        commonslog.info(message, t);
    }
}

From source file:com.headissue.pigeon.util.LogUtils.java

public static void info(Log log, Throwable t, String message, Object... args) {
    if (log.isInfoEnabled()) {
        if (args != null && args.length > 0) {
            message = String.format(message, args);
        }/*w w  w .  j  a  v a 2  s  . c  o  m*/
        log.info(message, t);
    }
}

From source file:es.tunelator.log.Logger.java

/**
 * @param source/*from   w ww . j ava2 s. com*/
 * @param msg
 * @param e
 */
public static void logInfo(Class source, String msg, Throwable e) {
    Log log = LogFactory.getLog(es.tunelator.AppParameters.LOG_INFO);
    //        Log log = LogFactory.getLog(source);
    log.info(msg, e);
}

From source file:com.runwaysdk.logging.RunwayLogUtil.java

public static void logToLevel(Log log, LogLevel level, String msg, Throwable t) {
    if (level == LogLevel.TRACE) {
        log.trace(msg, t);//ww  w  .j a v  a 2 s .c  o  m
    } else if (level == LogLevel.DEBUG) {
        log.debug(msg, t);
    } else if (level == LogLevel.INFO) {
        log.info(msg, t);
    } else if (level == LogLevel.WARN) {
        log.warn(msg, t);
    } else if (level == LogLevel.ERROR) {
        log.error(msg, t);
    } else if (level == LogLevel.FATAL) {
        log.fatal(msg, t);
    } else {
        log.fatal(
                "RunwayLogUtil.logToLevel was called, but an invalid level was specified. Here is the message we were passed: '"
                        + msg + "'");
    }
}

From source file:net.sourceforge.eclipsetrader.core.internal.LogListener.java

public void logging(IStatus status, String plugin) {
    Log log = LogFactory.getLog(plugin);
    switch (status.getSeverity()) {
    case IStatus.INFO:
        log.info(status.getMessage(), status.getException());
        break;/*from   w  w  w. j  a v  a  2 s  .  com*/
    case IStatus.WARNING:
        log.warn(status.getMessage(), status.getException());
        break;
    case IStatus.ERROR:
        log.error(status.getMessage(), status.getException());
        break;
    default:
        log.debug(status.getMessage(), status.getException());
        break;
    }
}

From source file:hadoopInstaller.logging.CompositeLog.java

@Override
public void info(Object message, Throwable t) {
    for (Log log : this.logs) {
        log.info(message, t);
    }/*from  ww w  .  j  av a  2  s.c  om*/
}