blob: 5fadffddac9522578380c447135328857118af7a [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 -->
<title>Logging (Apache SIS 1.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2019-09-20">
<meta name="keywords" content="org.apache.sis.util.logging.Logging class">
<meta name="keywords" content="setLoggerFactory()">
<meta name="keywords" content="getLoggerFactory()">
<meta name="keywords" content="getLogger()">
<meta name="keywords" content="log()">
<meta name="keywords" content="unexpectedException()">
<meta name="keywords" content="recoverableException()">
<meta name="keywords" content="ignorableException()">
<meta name="keywords" content="severeException()">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../sis.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Logging (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Logging.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.util.logging</a></div>
<h2 title="Class Logging" class="title">Class Logging</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../Static.html" title="class in org.apache.sis.util">Static</a></li>
<li>
<ul class="inheritance">
<li>Logging</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">Logging</span>
extends <a href="../Static.html" title="class in org.apache.sis.util">Static</a></pre>
<div class="block">A set of utilities method for configuring loggings in SIS. Library implementers should fetch
their loggers using the <a href="#getLogger(java.lang.String)"><code>get­Logger(String)</code></a> static method defined in this <code>Logging</code>
class rather than the one defined in the standard <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink"><code>Logger</code></a> class, in order to give SIS a
chance to redirect the logs to an other framework like
<a href="http://commons.apache.org/logging/">Commons-logging</a> or
<a href="http://logging.apache.org/log4j">Log4J</a>.
<p>This class provides also some convenience static methods, including:</p>
<ul>
<li><a href="#log(java.lang.Class,java.lang.String,java.util.logging.LogRecord)"><code>log(Class, String, Log­Record)</code></a> for <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/LogRecord.html?is-external=true#setLoggerName(java.lang.String)" title="class or interface in java.util.logging" class="externalLink">setting
the logger name</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/LogRecord.html?is-external=true#setSourceClassName(java.lang.String)" title="class or interface in java.util.logging" class="externalLink">source class name</a> and
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/LogRecord.html?is-external=true#setSourceMethodName(java.lang.String)" title="class or interface in java.util.logging" class="externalLink">source method name</a> of the given record
before to log it.</li>
<li><a href="#unexpectedException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)"><code>unexpected­Exception(Logger, Class, String, Throwable)</code></a> for reporting an anomalous but
nevertheless non-fatal exception.</li>
</ul></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.3</dd>
<p><font size="-1">Defined in the <code>sis-utility</code> module</font></p>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">Logger</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLogger(java.lang.Class)">getLogger</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;source)</code></th>
<td class="colLast">
<div class="block">Returns a logger for the package of the specified class.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">Logger</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLogger(java.lang.String)">getLogger</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name)</code></th>
<td class="colLast">
<div class="block">Returns a logger for the specified name.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="LoggerFactory.html" title="class in org.apache.sis.util.logging">LoggerFactory</a>&lt;?&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLoggerFactory()">getLoggerFactory</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the factory used for obtaining <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink"><code>Logger</code></a> instances, or <code>null</code> if none.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ignorableException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)">ignorableException</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">Logger</a>&nbsp;logger,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;classe,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;method,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Throwable</a>&nbsp;error)</code></th>
<td class="colLast">
<div class="block">Invoked when an ignorable error occurred.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#log(java.lang.Class,java.lang.String,java.util.logging.LogRecord)">log</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;classe,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;method,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/LogRecord.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">LogRecord</a>&nbsp;record)</code></th>
<td class="colLast">
<div class="block">Logs the given record to the logger associated to the given class.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#recoverableException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)">recoverableException</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">Logger</a>&nbsp;logger,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;classe,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;method,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Throwable</a>&nbsp;error)</code></th>
<td class="colLast">
<div class="block">Invoked when a recoverable error occurred.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setLoggerFactory(org.apache.sis.util.logging.LoggerFactory)">setLoggerFactory</a></span>&#8203;(<a href="LoggerFactory.html" title="class in org.apache.sis.util.logging">LoggerFactory</a>&lt;?&gt;&nbsp;factory)</code></th>
<td class="colLast">
<div class="block">Sets a new factory to use for obtaining <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink"><code>Logger</code></a> instances.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#severeException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)">severeException</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">Logger</a>&nbsp;logger,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;classe,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;method,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Throwable</a>&nbsp;error)</code></th>
<td class="colLast">
<div class="block">Invoked when a severe error occurred.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unexpectedException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)">unexpectedException</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">Logger</a>&nbsp;logger,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;classe,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;method,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Throwable</a>&nbsp;error)</code></th>
<td class="colLast">
<div class="block">Invoked when an unexpected error occurred.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">get­Class</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hash­Code</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notify­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">to­String</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="setLoggerFactory(org.apache.sis.util.logging.LoggerFactory)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLoggerFactory</h4>
<pre class="methodSignature"><a href="../Configuration.html" title="annotation in org.apache.sis.util">@Configuration</a>
public static&nbsp;void&nbsp;setLoggerFactory&#8203;(<a href="LoggerFactory.html" title="class in org.apache.sis.util.logging">LoggerFactory</a>&lt;?&gt;&nbsp;factory)</pre>
<div class="block">Sets a new factory to use for obtaining <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink"><code>Logger</code></a> instances.
If the given <code>factory</code> argument is <code>null</code> (the default),
then the standard Logging framework will be used.
<div class="section">Limitation</div>
SIS classes typically declare a logger constant like below:
<blockquote><pre><font color="green">public</font> <font color="green">static</font> <font color="green">final</font> Logger LOGGER = Logging.<b>getLogger</b>(<font color="orangered">"the.logger.name"</font>);</pre></blockquote>
Factory changes will take effect only if this method is invoked before the initialization
of such classes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>factory</code> - the new logger factory, or <code>null</code> if none.</dd>
</dl>
</li>
</ul>
<a id="getLoggerFactory()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLoggerFactory</h4>
<pre class="methodSignature">public static&nbsp;<a href="LoggerFactory.html" title="class in org.apache.sis.util.logging">LoggerFactory</a>&lt;?&gt;&nbsp;getLoggerFactory()</pre>
<div class="block">Returns the factory used for obtaining <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink"><code>Logger</code></a> instances, or <code>null</code> if none.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current logger factory, or <code>null</code> if none.</dd>
</dl>
</li>
</ul>
<a id="getLogger(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLogger</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">Logger</a>&nbsp;getLogger&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name)</pre>
<div class="block">Returns a logger for the specified name. If a <a href="LoggerFactory.html" title="class in org.apache.sis.util.logging">logger factory</a> has been set,
then this method first <a href="LoggerFactory.html#getLogger(java.lang.String)">asks to the factory</a>.
This rule gives SIS a chance to redirect logging events to
<a href="http://commons.apache.org/logging/">commons-logging</a> or some equivalent framework.
Only if no factory was found or if the factory choose to not redirect the loggings, then this
method delegate to <code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true#getLogger(java.lang.String)" title="class or interface in java.util.logging" class="externalLink">Logger​.get­Logger</a>(name)</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the logger name.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a logger for the specified name.</dd>
</dl>
</li>
</ul>
<a id="getLogger(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLogger</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">Logger</a>&nbsp;getLogger&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;source)</pre>
<div class="block">Returns a logger for the package of the specified class. This convenience method invokes
<a href="#getLogger(java.lang.String)"><code>get­Logger(String)</code></a> with the package name of the given class taken as the logger name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>source</code> - the class which will emit a logging message.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a logger for the specified class.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
</dl>
</li>
</ul>
<a id="log(java.lang.Class,java.lang.String,java.util.logging.LogRecord)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>log</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;log&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;classe,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;method,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/LogRecord.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">LogRecord</a>&nbsp;record)</pre>
<div class="block">Logs the given record to the logger associated to the given class.
This convenience method performs the following steps:
<ul>
<li>Unconditionally <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/LogRecord.html?is-external=true#setSourceClassName(java.lang.String)" title="class or interface in java.util.logging" class="externalLink">set the source class name</a>
to the <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#getCanonicalName()" title="class or interface in java.lang" class="externalLink">canonical name</a> of the given class;</li>
<li>Unconditionally <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/LogRecord.html?is-external=true#setSourceMethodName(java.lang.String)" title="class or interface in java.util.logging" class="externalLink">set the source method name</a>
to the given value;</li>
<li>Get the logger for the <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/LogRecord.html?is-external=true#getLoggerName()" title="class or interface in java.util.logging" class="externalLink">logger name</a> if specified,
or for the <code>classe</code> package name otherwise;</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/LogRecord.html?is-external=true#setLoggerName(java.lang.String)" title="class or interface in java.util.logging" class="externalLink">Set the logger name</a> of the given record,
if not already set;</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true#log(java.util.logging.LogRecord)" title="class or interface in java.util.logging" class="externalLink">Log</a> the modified record.</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>classe</code> - the class for which to obtain a logger.</dd>
<dd><code>method</code> - the name of the method which is logging a record.</dd>
<dd><code>record</code> - the record to log.</dd>
</dl>
</li>
</ul>
<a id="unexpectedException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unexpectedException</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;unexpectedException&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">Logger</a>&nbsp;logger,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;classe,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;method,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Throwable</a>&nbsp;error)</pre>
<div class="block">Invoked when an unexpected error occurred. This method logs a message at <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html?is-external=true#WARNING" title="class or interface in java.util.logging" class="externalLink"><code>Level​.WARNING</code></a>
to the specified logger. The originating class name and method name can optionally be specified.
If any of them is <code>null</code>, then it will be inferred from the error stack trace as described below.
<div class="note"><b>Recommended usage:</b>
explicit value for class and method names are preferred to automatic inference for the following reasons:
<ul>
<li>Automatic inference is not 100% reliable, since the Java Virtual Machine
is free to omit stack frame in optimized code.</li>
<li>When an exception occurred in a private method used internally by a public
method, we sometime want to log the warning for the public method instead,
since the user is not expected to know anything about the existence of the
private method. If a developer really want to know about the private method,
the stack trace is still available anyway.</li>
</ul></div>
If the <code>classe</code> or <code>method</code> arguments are null, then the originating class name and method name
are inferred from the given <code>error</code> using the first <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/StackTraceElement.html?is-external=true" title="class or interface in java.lang" class="externalLink">stack trace element</a>
for which the class name is inside a package or sub-package of the same name than the logger name.
<div class="note"><b>Example:</b>
if the logger name is <code>"org​.apache​.sis​.image"</code>, then this method will uses the first stack
trace element where the fully qualified class name starts with <code>"org​.apache​.sis​.image"</code> or
<code>"org​.apache​.sis​.image​.io"</code>, but not <code>"org​.apache​.sis​.imageio"</code>.</div></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>logger</code> - where to log the error, or <code>null</code> for inferring a default value from other arguments.</dd>
<dd><code>classe</code> - the class where the error occurred, or <code>null</code> for inferring a default value from other arguments.</dd>
<dd><code>method</code> - the method where the error occurred, or <code>null</code> for inferring a default value from other arguments.</dd>
<dd><code>error</code> - the error, or <code>null</code> if none.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the error has been logged, or <code>false</code> if the given <code>error</code>
was null or if the logger does not log anything at <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html?is-external=true#WARNING" title="class or interface in java.util.logging" class="externalLink"><code>Level​.WARNING</code></a>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#recoverableException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)"><code>recoverable­Exception(Logger, Class, String, Throwable)</code></a>,
<a href="#severeException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)"><code>severe­Exception(Logger, Class, String, Throwable)</code></a></dd>
</dl>
</li>
</ul>
<a id="recoverableException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>recoverableException</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;recoverableException&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">Logger</a>&nbsp;logger,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;classe,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;method,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Throwable</a>&nbsp;error)</pre>
<div class="block">Invoked when a recoverable error occurred. This method is similar to
<a href="#unexpectedException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)"><code>unexpected­Exception(…)</code></a>
except that it does not log the stack trace and uses a lower logging level.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>logger</code> - where to log the error, or <code>null</code> for inferring a default value from other arguments.</dd>
<dd><code>classe</code> - the class where the error occurred, or <code>null</code> for inferring a default value from other arguments.</dd>
<dd><code>method</code> - the method name where the error occurred, or <code>null</code> for inferring a default value from other arguments.</dd>
<dd><code>error</code> - the error, or <code>null</code> if none.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the error has been logged, or <code>false</code> if the given <code>error</code>
was null or if the logger does not log anything at <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html?is-external=true#FINE" title="class or interface in java.util.logging" class="externalLink"><code>Level​.FINE</code></a>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#unexpectedException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)"><code>unexpected­Exception(Logger, Class, String, Throwable)</code></a>,
<a href="#severeException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)"><code>severe­Exception(Logger, Class, String, Throwable)</code></a></dd>
</dl>
</li>
</ul>
<a id="ignorableException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ignorableException</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;ignorableException&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">Logger</a>&nbsp;logger,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;classe,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;method,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Throwable</a>&nbsp;error)</pre>
<div class="block">Invoked when an ignorable error occurred. This method is similar to
<a href="#recoverableException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)"><code>unexpected­Exception(…)</code></a>
except that it uses a lower logging level.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>logger</code> - where to log the error, or <code>null</code> for inferring a default value from other arguments.</dd>
<dd><code>classe</code> - the class where the error occurred, or <code>null</code> for inferring a default value from other arguments.</dd>
<dd><code>method</code> - the method name where the error occurred, or <code>null</code> for inferring a default value from other arguments.</dd>
<dd><code>error</code> - the error, or <code>null</code> if none.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the error has been logged, or <code>false</code> if the given <code>error</code>
was null or if the logger does not log anything at <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html?is-external=true#FINER" title="class or interface in java.util.logging" class="externalLink"><code>Level​.FINER</code></a>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
</dl>
</li>
</ul>
<a id="severeException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>severeException</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;severeException&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging" class="externalLink">Logger</a>&nbsp;logger,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&lt;?&gt;&nbsp;classe,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;method,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Throwable</a>&nbsp;error)</pre>
<div class="block">Invoked when a severe error occurred. This method is similar to
<a href="#unexpectedException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)"><code>unexpected­Exception</code></a>
except that it logs the message at the <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html?is-external=true#SEVERE" title="class or interface in java.util.logging" class="externalLink"><code>SEVERE</code></a> level.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>logger</code> - where to log the error, or <code>null</code> for inferring a default value from other arguments.</dd>
<dd><code>classe</code> - the class where the error occurred, or <code>null</code> for inferring a default value from other arguments.</dd>
<dd><code>method</code> - the method name where the error occurred, or <code>null</code> for inferring a default value from other arguments.</dd>
<dd><code>error</code> - the error, or <code>null</code> if none.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the error has been logged, or <code>false</code> if the given <code>error</code>
was null or if the logger does not log anything at <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html?is-external=true#SEVERE" title="class or interface in java.util.logging" class="externalLink"><code>Level​.SEVERE</code></a>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#unexpectedException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)"><code>unexpected­Exception(Logger, Class, String, Throwable)</code></a>,
<a href="#recoverableException(java.util.logging.Logger,java.lang.Class,java.lang.String,java.lang.Throwable)"><code>recoverable­Exception(Logger, Class, String, Throwable)</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Logging.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2010&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>