APISonar


org.apache.log.Logger.log

> org > apache > log > Logger > log
org APIs apache APIs log APIs Logger APIs log APIs

Example 1
final transient Logger logger;

    public void error(String message, Throwable throwable) {
        if (logger.isErrorEnabled()) {
            logger.log(Priority.ERROR, message, throwable);
        }
    }
Example 2
final transient Logger logger;

    public void warn(String format, Object... args) {
        if (logger.isWarnEnabled()) {
            FormattingTuple ft = MessageFormatter.format(format, args);
            logger.log(Priority.WARN, ft.getMessage(), ft.getThrowable());
        }
    }