mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 02:22:52 +01:00
1849 lines
65 KiB
HTML
1849 lines
65 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<html>
|
|
<head>
|
|
<title>Extras - CPD Results</title>
|
|
<style type="text/css" media="all">
|
|
@import url("./css/maven-base.css");
|
|
@import url("./css/maven-theme.css");
|
|
@import url("./css/site.css");
|
|
</style>
|
|
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
</head>
|
|
<body class="composite">
|
|
<div id="banner">
|
|
<a href="http://logging.apache.org/" id="bannerLeft">
|
|
|
|
<img src="images/ls-logo.jpg" alt="" />
|
|
|
|
</a>
|
|
<a href="http://logging.apache.org/log4j" id="bannerRight">
|
|
|
|
<img src="images/logo.jpg" alt="" />
|
|
|
|
</a>
|
|
<div class="clear">
|
|
<hr/>
|
|
</div>
|
|
</div>
|
|
<div id="breadcrumbs">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="xleft">
|
|
Last Published: 08/25/2007
|
|
|
|
|
<a href="http://www.apache.org/">Apache</a>
|
|
>
|
|
|
|
<a href="http://logging.apache.org/">Logging Services</a>
|
|
>
|
|
|
|
<a href="http://logging.apache.org/log4j/">log4j</a>
|
|
>
|
|
|
|
<a href="http://logging.apache.org/log4j/companions/">Companions</a>
|
|
>
|
|
|
|
extras
|
|
</div>
|
|
<div class="xright">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="clear">
|
|
<hr/>
|
|
</div>
|
|
</div>
|
|
<div id="leftColumn">
|
|
<div id="navcolumn">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Get extras</h5>
|
|
<ul>
|
|
|
|
<li class="none">
|
|
<a href="download.html">Download</a>
|
|
</li>
|
|
|
|
<li class="none">
|
|
<a href="changes-report.html">Changes</a>
|
|
</li>
|
|
|
|
<li class="none">
|
|
<a href="license.html">License</a>
|
|
</li>
|
|
</ul>
|
|
<h5>About extras</h5>
|
|
<ul>
|
|
|
|
<li class="none">
|
|
<a href="index.html">What is it?</a>
|
|
</li>
|
|
|
|
<li class="none">
|
|
<a href="roadmap.html">Roadmap</a>
|
|
</li>
|
|
|
|
<li class="none">
|
|
<a href="apidocs/index.html">JavaDoc</a>
|
|
</li>
|
|
</ul>
|
|
<h5>Community</h5>
|
|
<ul>
|
|
|
|
<li class="none">
|
|
<a href="mail-lists.html">Mailing Lists</a>
|
|
</li>
|
|
|
|
<li class="none">
|
|
<a href="issue-tracking.html">Issue Tracking</a>
|
|
</li>
|
|
</ul>
|
|
<h5>Development</h5>
|
|
<ul>
|
|
|
|
<li class="none">
|
|
<a href="source-repository.html">Repository</a>
|
|
</li>
|
|
|
|
<li class="none">
|
|
<a href="jxr.html">Cross Reference</a>
|
|
</li>
|
|
|
|
<li class="none">
|
|
<a href="dependencies.html">Dependencies</a>
|
|
</li>
|
|
|
|
<li class="none">
|
|
<a href="integration.html">Continuous Integration</a>
|
|
</li>
|
|
|
|
<li class="none">
|
|
<strong>Duplication</strong>
|
|
</li>
|
|
|
|
<li class="none">
|
|
<a href="pmd.html">PMD</a>
|
|
</li>
|
|
</ul>
|
|
<h5>Apache</h5>
|
|
<ul>
|
|
|
|
<li class="none">
|
|
<a href="http://www.apache.org">Home</a>
|
|
</li>
|
|
|
|
<li class="none">
|
|
<a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
|
|
</li>
|
|
|
|
<li class="none">
|
|
<a href="http://www.apache.org/foundation/thanks.html">Thanks</a>
|
|
</li>
|
|
|
|
<li class="none">
|
|
<a href="http://www.apachecon.com">Conferences</a>
|
|
</li>
|
|
</ul>
|
|
<a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy">
|
|
<img alt="Built by Maven" src="./images/logos/maven-feather.png"></img>
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div id="bodyColumn">
|
|
<div id="contentBox">
|
|
<div class="section"><h2>CPD Results</h2><p>The following document contains the results of PMD's <a href="http://pmd.sourceforge.net/cpd.html">CPD</a> 3.9.</p></div><div class="section"><h2>Duplications</h2><p><table class="bodyTable"><tr class="a"><th>File</th><th>Line</th></tr><tr class="b"><td>org/apache/log4j/LogMF.java</td><td><a href="./xref/org/apache/log4j/LogMF.html#309">309</a></td></tr><tr class="a"><td>org/apache/log4j/LogSF.java</td><td><a href="./xref/org/apache/log4j/LogSF.html#253">253</a></td></tr><tr class="b"><td colspan='2'><div class="source"><pre> private static final String FQCN = LogSF.class.getName();
|
|
|
|
/**
|
|
* Equivalent of Logger.forcedLog.
|
|
*
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param msg message, may be null.
|
|
*/
|
|
private static void forcedLog(final Logger logger,
|
|
final Level level,
|
|
final String msg) {
|
|
logger.callAppenders(new LoggingEvent(FQCN, logger, level, msg, null));
|
|
}
|
|
|
|
/**
|
|
* Equivalent of Logger.forcedLog.
|
|
*
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param msg message, may be null.
|
|
* @param t throwable.
|
|
*/
|
|
private static void forcedLog(final Logger logger,
|
|
final Level level,
|
|
final String msg,
|
|
final Throwable t) {
|
|
logger.callAppenders(new LoggingEvent(FQCN, logger, level, msg, t));
|
|
}
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arguments an array of arguments to be
|
|
* formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger, final String pattern,
|
|
final Object[] arguments) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE, format(pattern, arguments));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arguments an array of arguments to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger, final String pattern,
|
|
final Object[] arguments) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG, format(pattern, arguments));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arguments an array of arguments to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger, final String pattern,
|
|
final Object[] arguments) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern, arguments));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arguments an array of arguments to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger, final String pattern,
|
|
final Object[] arguments) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN, format(pattern, arguments));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at error level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arguments an array of arguments to be formatted and substituted.
|
|
*/
|
|
public static void error(final Logger logger, final String pattern,
|
|
final Object[] arguments) {
|
|
if (logger.isEnabledFor(Level.ERROR)) {
|
|
forcedLog(logger, Level.ERROR, format(pattern, arguments));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at fatal level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arguments an array of arguments to be formatted and substituted.
|
|
*/
|
|
public static void fatal(final Logger logger, final String pattern,
|
|
final Object[] arguments) {
|
|
if (logger.isEnabledFor(Level.FATAL)) {
|
|
forcedLog(logger, Level.FATAL, format(pattern, arguments));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param t throwable, may be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arguments an array of arguments to be
|
|
* formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger,
|
|
final Throwable t,
|
|
final String pattern,
|
|
final Object[] arguments) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE, format(pattern, arguments), t);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param t throwable, may be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arguments an array of arguments to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger,
|
|
final Throwable t,
|
|
final String pattern,
|
|
final Object[] arguments) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG, format(pattern, arguments), t);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param t throwable, may be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arguments an array of arguments to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger,
|
|
final Throwable t,
|
|
final String pattern,
|
|
final Object[] arguments) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern, arguments), t);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param t throwable, may be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arguments an array of arguments to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger,
|
|
final Throwable t,
|
|
final String pattern,
|
|
final Object[] arguments) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN, format(pattern, arguments), t);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at error level.
|
|
* @param logger logger, may not be null.
|
|
* @param t throwable, may be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arguments an array of arguments to be formatted and substituted.
|
|
*/
|
|
public static void error(final Logger logger,
|
|
final Throwable t,
|
|
final String pattern,
|
|
final Object[] arguments) {
|
|
if (logger.isEnabledFor(Level.ERROR)) {
|
|
forcedLog(logger, Level.ERROR, format(pattern, arguments), t);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at fatal level.
|
|
* @param logger logger, may not be null.
|
|
* @param t throwable, may be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arguments an array of arguments to be formatted and substituted.
|
|
*/
|
|
public static void fatal(final Logger logger,
|
|
final Throwable t,
|
|
final String pattern,
|
|
final Object[] arguments) {
|
|
if (logger.isEnabledFor(Level.FATAL)) {
|
|
forcedLog(logger, Level.FATAL, format(pattern, arguments), t);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger, final String pattern,
|
|
final boolean argument) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger, final String pattern,
|
|
final char argument) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger, final String pattern,
|
|
final byte argument) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger, final String pattern,
|
|
final short argument) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger, final String pattern,
|
|
final int argument) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger, final String pattern,
|
|
final long argument) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger, final String pattern,
|
|
final float argument) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger, final String pattern,
|
|
final double argument) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger, final String pattern,
|
|
final Object argument) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE, format(pattern, argument));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger, final String pattern,
|
|
final Object arg0, final Object arg1) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE,
|
|
format(pattern, toArray(arg0, arg1)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
* @param arg2 a value to be formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger, final String pattern,
|
|
final Object arg0, final Object arg1, final Object arg2) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE,
|
|
format(pattern, toArray(arg0, arg1, arg2)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at trace level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
* @param arg2 a value to be formatted and substituted.
|
|
* @param arg3 a value to be formatted and substituted.
|
|
*/
|
|
public static void trace(final Logger logger, final String pattern,
|
|
final Object arg0, final Object arg1, final Object arg2,
|
|
final Object arg3) {
|
|
if (logger.isEnabledFor(TRACE)) {
|
|
forcedLog(logger, TRACE,
|
|
format(pattern, toArray(arg0, arg1, arg2, arg3)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger, final String pattern,
|
|
final boolean argument) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger, final String pattern,
|
|
final char argument) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger, final String pattern,
|
|
final byte argument) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger, final String pattern,
|
|
final short argument) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger, final String pattern,
|
|
final int argument) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger, final String pattern,
|
|
final long argument) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger, final String pattern,
|
|
final float argument) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger, final String pattern,
|
|
final double argument) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger, final String pattern,
|
|
final Object argument) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG, format(pattern, argument));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger, final String pattern,
|
|
final Object arg0, final Object arg1) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG,
|
|
format(pattern, toArray(arg0, arg1)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
* @param arg2 a value to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger, final String pattern,
|
|
final Object arg0, final Object arg1, final Object arg2) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG,
|
|
format(pattern, toArray(arg0, arg1, arg2)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at debug level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
* @param arg2 a value to be formatted and substituted.
|
|
* @param arg3 a value to be formatted and substituted.
|
|
*/
|
|
public static void debug(final Logger logger, final String pattern,
|
|
final Object arg0, final Object arg1, final Object arg2,
|
|
final Object arg3) {
|
|
if (logger.isDebugEnabled()) {
|
|
forcedLog(logger, Level.DEBUG,
|
|
format(pattern, toArray(arg0, arg1, arg2, arg3)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger, final String pattern,
|
|
final boolean argument) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger, final String pattern,
|
|
final char argument) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger, final String pattern,
|
|
final byte argument) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger, final String pattern,
|
|
final short argument) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger, final String pattern,
|
|
final int argument) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger, final String pattern,
|
|
final long argument) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger, final String pattern,
|
|
final float argument) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger, final String pattern,
|
|
final double argument) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger, final String pattern,
|
|
final Object argument) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern, argument));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger, final String pattern,
|
|
final Object arg0, final Object arg1) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern, toArray(arg0, arg1)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
* @param arg2 a value to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger, final String pattern,
|
|
final Object arg0, final Object arg1, final Object arg2) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern,
|
|
toArray(arg0, arg1, arg2)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at info level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
* @param arg2 a value to be formatted and substituted.
|
|
* @param arg3 a value to be formatted and substituted.
|
|
*/
|
|
public static void info(final Logger logger, final String pattern,
|
|
final Object arg0, final Object arg1, final Object arg2,
|
|
final Object arg3) {
|
|
if (logger.isInfoEnabled()) {
|
|
forcedLog(logger, Level.INFO, format(pattern,
|
|
toArray(arg0, arg1, arg2, arg3)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger, final String pattern,
|
|
final boolean argument) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger, final String pattern,
|
|
final char argument) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger, final String pattern,
|
|
final byte argument) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger, final String pattern,
|
|
final short argument) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger, final String pattern,
|
|
final int argument) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger, final String pattern,
|
|
final long argument) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger, final String pattern,
|
|
final float argument) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger, final String pattern,
|
|
final double argument) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN, format(pattern, valueOf(argument)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param argument a value to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger, final String pattern,
|
|
final Object argument) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN, format(pattern, argument));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger, final String pattern,
|
|
final Object arg0, final Object arg1) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN,
|
|
format(pattern, toArray(arg0, arg1)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
* @param arg2 a value to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger, final String pattern,
|
|
final Object arg0, final Object arg1, final Object arg2) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN,
|
|
format(pattern, toArray(arg0, arg1, arg2)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at warn level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
* @param arg2 a value to be formatted and substituted.
|
|
* @param arg3 a value to be formatted and substituted.
|
|
*/
|
|
public static void warn(final Logger logger, final String pattern,
|
|
final Object arg0, final Object arg1, final Object arg2,
|
|
final Object arg3) {
|
|
if (logger.isEnabledFor(Level.WARN)) {
|
|
forcedLog(logger, Level.WARN, format(pattern,
|
|
toArray(arg0, arg1, arg2, arg3)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at specified level.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param parameters parameters to the log message.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final String pattern,
|
|
final Object[] parameters) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(pattern, parameters));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at specified level.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param t throwable, may be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param parameters parameters to the log message.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final Throwable t,
|
|
final String pattern,
|
|
final Object[] parameters) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(pattern, parameters), t);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at specified level.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param param1 parameter to the log message.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final String pattern,
|
|
final Object param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(pattern, toArray(param1)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at specified level.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param param1 parameter to the log message.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final String pattern,
|
|
final boolean param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(pattern, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Log a parameterized message at specified level.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param param1 parameter to the log message.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final String pattern,
|
|
final byte param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(pattern, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Log a parameterized message at specified level.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param param1 parameter to the log message.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final String pattern,
|
|
final char param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(pattern, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at specified level.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param param1 parameter to the log message.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final String pattern,
|
|
final short param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(pattern, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at specified level.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param param1 parameter to the log message.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final String pattern,
|
|
final int param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(pattern, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Log a parameterized message at specified level.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param param1 parameter to the log message.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final String pattern,
|
|
final long param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(pattern, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Log a parameterized message at specified level.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param param1 parameter to the log message.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final String pattern,
|
|
final float param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(pattern, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Log a parameterized message at specified level.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param param1 parameter to the log message.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final String pattern,
|
|
final double param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(pattern, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Log a parameterized message at specified level.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final String pattern,
|
|
final Object arg0, final Object arg1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(pattern, toArray(arg0, arg1)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at specifed level.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
* @param arg2 a value to be formatted and substituted.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final String pattern,
|
|
final Object arg0, final Object arg1, final Object arg2) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(pattern, toArray(arg0, arg1, arg2)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message at specified level.
|
|
* @param logger logger, may not be null.
|
|
* @param pattern pattern, may be null.
|
|
* @param level level, may not be null.
|
|
* @param arg0 a value to be formatted and substituted.
|
|
* @param arg1 a value to be formatted and substituted.
|
|
* @param arg2 a value to be formatted and substituted.
|
|
* @param arg3 a value to be formatted and substituted.
|
|
*/
|
|
public static void log(final Logger logger,
|
|
final Level level,
|
|
final String pattern,
|
|
final Object arg0, final Object arg1, final Object arg2,
|
|
final Object arg3) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level, format(pattern,
|
|
toArray(arg0, arg1, arg2, arg3)));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param parameters parameters to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final String bundleName,
|
|
final String key,
|
|
final Object[] parameters) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key, parameters));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param t throwable, may be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param parameters parameters to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final Throwable t,
|
|
final String bundleName,
|
|
final String key,
|
|
final Object[] parameters) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key, parameters), t);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param param1 Parameter to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final String bundleName,
|
|
final String key,
|
|
final Object param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key, toArray(param1)));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param param1 Parameter to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final String bundleName,
|
|
final String key,
|
|
final boolean param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param param1 Parameter to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final String bundleName,
|
|
final String key,
|
|
final char param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param param1 Parameter to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final String bundleName,
|
|
final String key,
|
|
final byte param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param param1 Parameter to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final String bundleName,
|
|
final String key,
|
|
final short param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param param1 Parameter to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final String bundleName,
|
|
final String key,
|
|
final int param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param param1 Parameter to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final String bundleName,
|
|
final String key,
|
|
final long param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param param1 Parameter to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final String bundleName,
|
|
final String key,
|
|
final float param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param param1 Parameter to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final String bundleName,
|
|
final String key,
|
|
final double param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key, toArray(valueOf(param1))));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param param0 Parameter to the log message.
|
|
* @param param1 Parameter to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final String bundleName,
|
|
final String key,
|
|
final Object param0,
|
|
final Object param1) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key, toArray(param0, param1)));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param param0 Parameter to the log message.
|
|
* @param param1 Parameter to the log message.
|
|
* @param param2 Parameter to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final String bundleName,
|
|
final String key,
|
|
final Object param0,
|
|
final Object param1,
|
|
final Object param2) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key, toArray(param0, param1, param2)));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Log a parameterized message using a pattern from a resource bundle.
|
|
* @param logger logger, may not be null.
|
|
* @param level level, may not be null.
|
|
* @param bundleName resource bundle name, may be null.
|
|
* @param key key, may be null.
|
|
* @param param0 Parameter to the log message.
|
|
* @param param1 Parameter to the log message.
|
|
* @param param2 Parameter to the log message.
|
|
* @param param3 Parameter to the log message.
|
|
*/
|
|
public static void logrb(final Logger logger,
|
|
final Level level,
|
|
final String bundleName,
|
|
final String key,
|
|
final Object param0,
|
|
final Object param1,
|
|
final Object param2,
|
|
final Object param3) {
|
|
if (logger.isEnabledFor(level)) {
|
|
forcedLog(logger, level,
|
|
format(bundleName, key,
|
|
toArray(param0, param1, param2, param3)));
|
|
}
|
|
}
|
|
}</pre></div></td></tr><table class="bodyTable"></p><p><table class="bodyTable"><tr class="a"><th>File</th><th>Line</th></tr><tr class="b"><td>org/apache/log4j/LogMF.java</td><td><a href="./xref/org/apache/log4j/LogMF.html#42">42</a></td></tr><tr class="a"><td>org/apache/log4j/LogSF.java</td><td><a href="./xref/org/apache/log4j/LogSF.html#39">39</a></td></tr><tr class="b"><td colspan='2'><div class="source"><pre> private LogSF() {
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Returns a Boolean instance representing the specified boolean.
|
|
* Boolean.valueOf was added in JDK 1.4.
|
|
* @param b a boolean value.
|
|
* @return a Boolean instance representing b.
|
|
*/
|
|
private static Boolean valueOf(final boolean b) {
|
|
if (b) {
|
|
return Boolean.TRUE;
|
|
}
|
|
return Boolean.FALSE;
|
|
}
|
|
|
|
/**
|
|
* Returns a Character instance representing the specified char.
|
|
* Character.valueOf was added in JDK 1.5.
|
|
* @param c a character value.
|
|
* @return a Character instance representing c.
|
|
*/
|
|
private static Character valueOf(final char c) {
|
|
return new Character(c);
|
|
}
|
|
|
|
/**
|
|
* Returns a Byte instance representing the specified byte.
|
|
* Byte.valueOf was added in JDK 1.5.
|
|
* @param b a byte value.
|
|
* @return a Byte instance representing b.
|
|
*/
|
|
private static Byte valueOf(final byte b) {
|
|
return new Byte(b);
|
|
}
|
|
|
|
/**
|
|
* Returns a Short instance representing the specified short.
|
|
* Short.valueOf was added in JDK 1.5.
|
|
* @param b a short value.
|
|
* @return a Byte instance representing b.
|
|
*/
|
|
private static Short valueOf(final short b) {
|
|
return new Short(b);
|
|
}
|
|
|
|
/**
|
|
* Returns an Integer instance representing the specified int.
|
|
* Integer.valueOf was added in JDK 1.5.
|
|
* @param b an int value.
|
|
* @return an Integer instance representing b.
|
|
*/
|
|
private static Integer valueOf(final int b) {
|
|
return new Integer(b);
|
|
}
|
|
|
|
/**
|
|
* Returns a Long instance representing the specified long.
|
|
* Long.valueOf was added in JDK 1.5.
|
|
* @param b a long value.
|
|
* @return a Long instance representing b.
|
|
*/
|
|
private static Long valueOf(final long b) {
|
|
return new Long(b);
|
|
}
|
|
|
|
/**
|
|
* Returns a Float instance representing the specified float.
|
|
* Float.valueOf was added in JDK 1.5.
|
|
* @param b a float value.
|
|
* @return a Float instance representing b.
|
|
*/
|
|
private static Float valueOf(final float b) {
|
|
return new Float(b);
|
|
}
|
|
|
|
/**
|
|
* Returns a Double instance representing the specified double.
|
|
* Double.valueOf was added in JDK 1.5.
|
|
* @param b a double value.
|
|
* @return a Byte instance representing b.
|
|
*/
|
|
private static Double valueOf(final double b) {
|
|
return new Double(b);
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Create new array.
|
|
* @param param1 parameter 1.
|
|
* @return new array.
|
|
*/
|
|
private static Object[] toArray(final Object param1) {
|
|
return new Object[] {
|
|
param1
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Create new array.
|
|
* @param param1 parameter 1.
|
|
* @param param2 parameter 2.
|
|
* @return new array.
|
|
*/
|
|
private static Object[] toArray(final Object param1,
|
|
final Object param2) {
|
|
return new Object[] {
|
|
param1, param2
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Create new array.
|
|
* @param param1 parameter 1.
|
|
* @param param2 parameter 2.
|
|
* @param param3 parameter 3.
|
|
* @return new array.
|
|
*/
|
|
private static Object[] toArray(final Object param1,
|
|
final Object param2,
|
|
final Object param3) {
|
|
return new Object[] {
|
|
param1, param2, param3
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Create new array.
|
|
* @param param1 parameter 1.
|
|
* @param param2 parameter 2.
|
|
* @param param3 parameter 3.
|
|
* @param param4 parameter 4.
|
|
* @return new array.
|
|
*/
|
|
private static Object[] toArray(final Object param1,
|
|
final Object param2,
|
|
final Object param3,
|
|
final Object param4) {
|
|
return new Object[] {
|
|
param1, param2, param3, param4
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Formats arguments using SLF4J-like formatter.
|
|
* @param pattern pattern, may be malformed.
|
|
* @param arguments arguments.
|
|
* @return Message string
|
|
*/
|
|
private static String format(final String pattern,</pre></div></td></tr><table class="bodyTable"></p><p><table class="bodyTable"><tr class="a"><th>File</th><th>Line</th></tr><tr class="b"><td>org/apache/log4j/rolling/helper/GZCompressAction.java</td><td><a href="./xref/org/apache/log4j/rolling/helper/GZCompressAction.html#59">59</a></td></tr><tr class="a"><td>org/apache/log4j/rolling/helper/ZipCompressAction.java</td><td><a href="./xref/org/apache/log4j/rolling/helper/ZipCompressAction.html#60">60</a></td></tr><tr class="b"><td colspan='2'><div class="source"><pre> public ZipCompressAction(
|
|
final File source, final File destination, final boolean deleteSource) {
|
|
if (source == null) {
|
|
throw new NullPointerException("source");
|
|
}
|
|
|
|
if (destination == null) {
|
|
throw new NullPointerException("destination");
|
|
}
|
|
|
|
this.source = source;
|
|
this.destination = destination;
|
|
this.deleteSource = deleteSource;
|
|
}
|
|
|
|
/**
|
|
* Compress.
|
|
* @return true if successfully compressed.
|
|
* @throws IOException on IO exception.
|
|
*/
|
|
public boolean execute() throws IOException {
|
|
return execute(source, destination, deleteSource);
|
|
}
|
|
|
|
/**
|
|
* Compress a file.
|
|
*
|
|
* @param source file to compress, may not be null.
|
|
* @param destination compressed file, may not be null.
|
|
* @param deleteSource if true, attempt to delete file on completion. Failure to delete
|
|
* does not cause an exception to be thrown or affect return value.
|
|
* @return true if source file compressed.
|
|
* @throws IOException on IO exception.
|
|
*/
|
|
public static boolean execute(
|
|
final File source, final File destination, final boolean deleteSource)
|
|
throws IOException {
|
|
if (source.exists()) {
|
|
FileInputStream fis = new FileInputStream(source);
|
|
FileOutputStream fos = new FileOutputStream(destination);</pre></div></td></tr><table class="bodyTable"></p><p><table class="bodyTable"><tr class="a"><th>File</th><th>Line</th></tr><tr class="b"><td>org/apache/log4j/rolling/RollingFileAppender.java</td><td><a href="./xref/org/apache/log4j/rolling/RollingFileAppender.html#244">244</a></td></tr><tr class="a"><td>org/apache/log4j/rolling/RollingFileAppender.java</td><td><a href="./xref/org/apache/log4j/rolling/RollingFileAppender.html#291">291</a></td></tr><tr class="b"><td colspan='2'><div class="source"><pre> this.qw = createQuietWriter(newWriter);
|
|
|
|
boolean success = true;
|
|
|
|
if (rollover.getSynchronous() != null) {
|
|
success = false;
|
|
|
|
try {
|
|
success = rollover.getSynchronous().execute();
|
|
} catch (Exception ex) {
|
|
exception = ex;
|
|
}
|
|
}
|
|
|
|
if (success) {
|
|
if (rollover.getAppend()) {
|
|
fileLength = new File(rollover.getActiveFileName()).length();
|
|
} else {
|
|
fileLength = 0;
|
|
}
|
|
|
|
if (rollover.getAsynchronous() != null) {
|
|
lastRolloverAsyncAction = rollover.getAsynchronous();
|
|
new Thread(lastRolloverAsyncAction).start();
|
|
}</pre></div></td></tr><table class="bodyTable"></p><p><table class="bodyTable"><tr class="a"><th>File</th><th>Line</th></tr><tr class="b"><td>org/apache/log4j/rule/LevelEqualsRule.java</td><td><a href="./xref/org/apache/log4j/rule/LevelEqualsRule.html#60">60</a></td></tr><tr class="a"><td>org/apache/log4j/rule/LevelInequalityRule.java</td><td><a href="./xref/org/apache/log4j/rule/LevelInequalityRule.html#53">53</a></td></tr><tr class="b"><td colspan='2'><div class="source"><pre> }
|
|
|
|
/**
|
|
* Populate list of levels.
|
|
*/
|
|
private static void populateLevels() {
|
|
levelList = new LinkedList();
|
|
|
|
levelList.add(Level.FATAL.toString());
|
|
levelList.add(Level.ERROR.toString());
|
|
levelList.add(Level.WARN.toString());
|
|
levelList.add(Level.INFO.toString());
|
|
levelList.add(Level.DEBUG.toString());
|
|
Level trace = Level.toLevel(5000, null);
|
|
if (trace != null) {
|
|
levelList.add(trace.toString());
|
|
}</pre></div></td></tr><table class="bodyTable"></p></div>
|
|
</div>
|
|
</div>
|
|
<div class="clear">
|
|
<hr/>
|
|
</div>
|
|
<div id="footer">
|
|
<div class="xright">©
|
|
2007
|
|
|
|
Apache Software Foundation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="clear">
|
|
<hr/>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|