sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1689925 - in /sis/branches/JDK8: core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ core/sis-metadata/src/main/java/org/apache/sis/metadata/ core/sis-metadata/src/main/j...
Date Wed, 08 Jul 2015 17:45:43 GMT
Author: desruisseaux
Date: Wed Jul  8 17:45:42 2015
New Revision: 1689925

URL: http://svn.apache.org/r1689925
Log:
Consolidation of loggers: declare the name of the logger that we use in an internal 'Loggers' class.
Deprecate the Logging methods that infer the logger name from the package name, because it sometime
select a logger too close to implementation details (e.g. "org.apache.sis.internal...").

Added:
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Loggers.java   (with props)
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/system/LoggersTest.java   (with props)
Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisNames.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/AbstractParser.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
    sis/branches/JDK8/core/sis-utility/pom.xml
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Modules.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Threads.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakEntry.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultInternationalString.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/LegacyCodes.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/MarshallerPool.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/XLink.java
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
    sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java
    sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/TestCase.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/IOUtilities.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisNames.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisNames.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisNames.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/AxisNames.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -20,6 +20,7 @@ import java.util.Map;
 import java.util.HashMap;
 import java.lang.reflect.Field;
 import org.apache.sis.util.logging.Logging;
+import org.apache.sis.internal.system.Modules;
 
 
 /**
@@ -153,7 +154,7 @@ public final class AxisNames {
              * We will take the values that we have been able to map so far. The other values will
              * just not have their case fixed.
              */
-            Logging.unexpectedException(AxisNames.class, "<cinit>", e);
+            Logging.unexpectedException(Logging.getLogger(Modules.REFERENCING), AxisNames.class, "<cinit>", e);
         }
         VALUES = values;
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/AbstractParser.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/AbstractParser.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/AbstractParser.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/AbstractParser.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -33,6 +33,7 @@ import javax.measure.unit.Unit;
 import javax.measure.unit.UnitFormat;
 import org.opengis.util.FactoryException;
 import org.opengis.util.InternationalString;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.util.StandardDateFormat;
 import org.apache.sis.measure.Units;
 import org.apache.sis.util.Workaround;
@@ -93,7 +94,7 @@ abstract class AbstractParser implements
      * This happen most often when the user invoke the {@link org.apache.sis.referencing.CRS#fromWKT(String)}
      * convenience method.
      */
-    private static final Logger LOGGER = Logging.getLogger(AbstractParser.class);
+    private static final Logger LOGGER = Logging.getLogger(Loggers.WKT);
 
     /**
      * The locale for error messages (not for number parsing), or {@code null} for the system default.

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -34,6 +34,7 @@ import org.apache.sis.util.collection.Co
 import org.apache.sis.internal.util.CheckedHashSet;
 import org.apache.sis.internal.util.CheckedArrayList;
 import org.apache.sis.internal.system.Semaphores;
+import org.apache.sis.internal.system.Modules;
 
 import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
@@ -191,8 +192,7 @@ public abstract class ModifiableMetadata
                  * (for example it may be backed by some external database).
                  * Assumes that the metadata is unmodifiable.
                  */
-                Logging.unexpectedException(Logging.getLogger(ModifiableMetadata.class),
-                                            getClass(), "unmodifiable", exception);
+                Logging.unexpectedException(Logging.getLogger(Modules.METADATA), getClass(), "unmodifiable", exception);
                 return this;
             }
             candidate.freeze();

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -29,6 +29,7 @@ import org.opengis.metadata.citation.Res
 import org.opengis.util.CodeList;
 import org.opengis.util.InternationalString;
 import org.apache.sis.internal.simple.SimpleIdentifier;
+import org.apache.sis.internal.system.Modules;
 import org.apache.sis.measure.ValueRange;
 import org.apache.sis.util.iso.Types;
 import org.apache.sis.util.Numbers;
@@ -289,7 +290,8 @@ final class PropertyInformation<E> exten
                      * to have an IllegalArgumentException while he didn't provided any argument.
                      * Returning null as a fallback is compliant with the method contract.
                      */
-                    Logging.unexpectedException(PropertyInformation.class, "getDomainValue", e);
+                    Logging.unexpectedException(Logging.getLogger(Modules.METADATA),
+                            PropertyInformation.class, "getDomainValue", e);
                     domain = null;
                 }
                 domainValue = domain;

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -23,6 +23,7 @@ import org.opengis.annotation.Classifier
 import org.opengis.annotation.Stereotype;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.logging.Logging;
+import org.apache.sis.internal.system.Modules;
 
 
 /**
@@ -156,7 +157,8 @@ final class StandardImplementation exten
                         implementations.put(type, candidate);
                         return candidate.asSubclass(type);
                     } catch (ClassNotFoundException e) {
-                        Logging.recoverableException(MetadataStandard.class, "getImplementation", e);
+                        Logging.recoverableException(Logging.getLogger(Modules.METADATA),
+                                MetadataStandard.class, "getImplementation", e);
                     }
                     implementations.put(type, Void.TYPE); // Marker for "class not found".
                 }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -31,6 +31,7 @@ import org.apache.sis.xml.IdentifiedObje
 import org.apache.sis.metadata.MetadataStandard;
 import org.apache.sis.metadata.ModifiableMetadata;
 import org.apache.sis.internal.jaxb.IdentifierMapWithSpecialCases;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.util.collection.Containers;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.CharSequences;
@@ -69,7 +70,7 @@ public class ISOMetadata extends Modifia
      * {@code "equivalentScale"} properties in {@link org.apache.sis.metadata.iso.identification.DefaultResolution}
      * are mutually exclusive: setting one discards the other. In such case, a warning is logged.
      */
-    public static final Logger LOGGER = Logging.getLogger(ISOMetadata.class);
+    public static final Logger LOGGER = Logging.getLogger(Loggers.ISO_19115);
 
     /**
      * All identifiers associated with this metadata, or {@code null} if none.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -45,6 +45,7 @@ import org.apache.sis.referencing.operat
 import org.apache.sis.internal.referencing.DirectPositionView;
 import org.apache.sis.internal.referencing.Formulas;
 import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.internal.system.Loggers;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 import static org.apache.sis.util.StringBuilders.trimFractionalPart;
@@ -123,7 +124,7 @@ public final class Envelopes extends Sta
      * that they can be silently ignored in most cases.
      */
     private static void recoverableException(final TransformException exception) {
-        Logging.recoverableException(Envelopes.class, "transform", exception);
+        Logging.recoverableException(Logging.getLogger(Loggers.GEOMETRY), Envelopes.class, "transform", exception);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -32,6 +32,7 @@ import org.apache.sis.util.logging.Loggi
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.internal.jaxb.Context;
+import org.apache.sis.internal.system.Modules;
 import org.apache.sis.referencing.CommonCRS;
 import org.apache.sis.referencing.datum.DefaultPrimeMeridian;
 import org.apache.sis.referencing.crs.DefaultGeographicCRS;
@@ -57,7 +58,7 @@ public final class ReferencingUtilities
     /**
      * The logger to use for messages related to the {@code sis-referencing} module.
      */
-    public static final Logger LOGGER = Logging.getLogger("org.apache.sis.referencing");
+    public static final Logger LOGGER = Logging.getLogger(Modules.REFERENCING);
 
     /**
      * Do not allow instantiation of this class.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -45,6 +45,7 @@ import org.apache.sis.internal.util.Defi
 import org.apache.sis.internal.metadata.AxisDirections;
 import org.apache.sis.internal.referencing.ReferencingUtilities;
 import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.referencing.cs.DefaultVerticalCS;
 import org.apache.sis.referencing.cs.DefaultEllipsoidalCS;
 import org.apache.sis.referencing.crs.DefaultGeographicCRS;
@@ -172,7 +173,7 @@ public final class CRS extends Static {
             return factory.createCoordinateReferenceSystem(value);
         } catch (FactoryException failure) {
             final CoordinateReferenceSystem crs = CommonCRS.forCode(authority, value, failure);
-            Logging.unexpectedException(CRS.class, "forCode", failure); // See above comment.
+            Logging.unexpectedException(Logging.getLogger(Loggers.CRS_FACTORY), CRS.class, "forCode", failure); // See above comment.
             return crs;
         } else {
             return CommonCRS.forCode(authority, value, null);

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -58,6 +58,7 @@ import org.apache.sis.referencing.crs.De
 import org.apache.sis.referencing.crs.DefaultGeocentricCRS;
 import org.apache.sis.internal.system.SystemListener;
 import org.apache.sis.internal.system.Modules;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.logging.Logging;
@@ -1342,10 +1343,10 @@ public enum CommonCRS {
 
     /**
      * Invoked when a factory failed to create an object.
-     * After invoking this method, then the caller will fallback on hard-coded values.
+     * After invoking this method, the caller will fallback on hard-coded values.
      */
     static void failure(final Object caller, final String method, final FactoryException e) {
-        Logging.unexpectedException(caller.getClass(), method, e);
+        Logging.unexpectedException(Logging.getLogger(Loggers.CRS_FACTORY), caller.getClass(), method, e);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -43,6 +43,7 @@ import org.apache.sis.internal.metadata.
 import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.internal.referencing.WKTUtilities;
 import org.apache.sis.internal.util.Constants;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.io.wkt.FormattableObject;
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.util.ComparisonMode;
@@ -472,7 +473,7 @@ public class DefaultProjectedCRS extends
                              * Since the intend of this check was to skip those parameters anyway, it is okay
                              * for the purpose of WKT formatting if there is no parameter for axis lengths.
                              */
-                            Logging.recoverableException(DefaultProjectedCRS.class, "formatTo", e);
+                            Logging.recoverableException(Logging.getLogger(Loggers.WKT), DefaultProjectedCRS.class, "formatTo", e);
                             continue;
                         }
                         if (Double.isNaN(value)) {

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -25,6 +25,7 @@ import org.apache.sis.measure.Longitude;
 import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.internal.metadata.AxisDirections;
 import org.apache.sis.internal.metadata.WKTKeywords;
+import org.apache.sis.internal.system.Modules;
 import org.apache.sis.io.wkt.FormattableObject;
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.util.ArgumentChecks;
@@ -117,7 +118,7 @@ final class DirectionAlongMeridian exten
         try {
             candidate = parse(direction.name());
         } catch (IllegalArgumentException e) {
-            Logging.recoverableException(DirectionAlongMeridian.class, "parse", e);
+            Logging.recoverableException(Logging.getLogger(Modules.REFERENCING), DirectionAlongMeridian.class, "parse", e);
             return null;
         }
         if (candidate != null) {

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -38,6 +38,7 @@ import org.apache.sis.internal.metadata.
 import org.apache.sis.internal.metadata.ReferencingServices;
 import org.apache.sis.internal.referencing.ExtentSelector;
 import org.apache.sis.internal.util.CollectionsExt;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.io.wkt.Formatter;
@@ -414,7 +415,8 @@ public class DefaultGeodeticDatum extend
                  * is defined in such a way that matrix should always be invertible. If it happen anyway,
                  * returning 'null' is allowed by this method's contract.
                  */
-                Logging.unexpectedException(DefaultGeodeticDatum.class, "getPositionVectorTransformation", e);
+                Logging.unexpectedException(Logging.getLogger(Loggers.COORDINATE_OPERATION),
+                        DefaultGeodeticDatum.class, "getPositionVectorTransformation", e);
             }
         }
         /*

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -38,6 +38,7 @@ import org.opengis.referencing.operation
 import org.apache.sis.internal.referencing.ExtendedPrecisionMatrix;
 import org.apache.sis.internal.referencing.WKTUtilities;
 import org.apache.sis.internal.metadata.WKTKeywords;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.util.DoubleDouble;
 import org.apache.sis.internal.util.UnmodifiableArrayList;
 import org.apache.sis.parameter.Parameters;
@@ -769,6 +770,6 @@ public class ContextualParameters extend
      * transform.</p>
      */
     private static void unexpectedException(final NoninvertibleMatrixException e) {
-        Logging.unexpectedException(ConcatenatedTransform.class, "formatTo", e);
+        Logging.unexpectedException(Logging.getLogger(Loggers.WKT), ConcatenatedTransform.class, "formatTo", e);
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -54,6 +54,7 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.internal.metadata.ReferencingServices;
 import org.apache.sis.internal.referencing.ReferencingUtilities;
 import org.apache.sis.internal.referencing.j2d.ParameterizedAffine;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.referencing.cs.AxesConvention;
 import org.apache.sis.referencing.cs.CoordinateSystems;
 import org.apache.sis.referencing.operation.DefaultOperationMethod;
@@ -538,7 +539,7 @@ public class DefaultMathTransformFactory
                 final LogRecord record = Messages.getResources((Locale) null).getLogRecord(Level.WARNING,
                         Messages.Keys.MismatchedEllipsoidAxisLength_3, ellipsoid.getName().getCode(),
                         mismatchedParam.getDescriptor().getName().getCode(), mismatchedValue);
-                record.setLoggerName("org.apache.sis.referencing.operation");
+                record.setLoggerName(Loggers.COORDINATE_OPERATION);
                 Logging.log(DefaultMathTransformFactory.class, "createBaseToDerived", record);
             }
         }

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -16,7 +16,6 @@
  */
 package org.apache.sis.referencing.crs;
 
-import java.util.logging.Logger;
 import javax.measure.unit.SI;
 import javax.measure.unit.NonSI;
 import javax.measure.unit.Unit;
@@ -29,7 +28,9 @@ import org.apache.sis.metadata.iso.citat
 import org.apache.sis.referencing.cs.HardCodedCS;
 import org.apache.sis.referencing.GeodeticObjectBuilder;
 import org.apache.sis.internal.util.Constants;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.io.wkt.Convention;
+import org.apache.sis.util.logging.Logging;
 import org.apache.sis.test.LoggingWatcher;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
@@ -62,7 +63,7 @@ public final strictfp class DefaultProje
      * (it should have been a private field).</p>
      */
     @Rule
-    public final LoggingWatcher listener = new LoggingWatcher(Logger.getLogger("org.apache.sis.referencing.operation")) {
+    public final LoggingWatcher listener = new LoggingWatcher(Logging.getLogger(Loggers.COORDINATE_OPERATION)) {
         @Override protected void verifyMessage(final String message) {
             assertTrue(message, message.contains("semi_minor"));
             assertTrue(message, message.contains("WGS84"));

Modified: sis/branches/JDK8/core/sis-utility/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/pom.xml?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/pom.xml (original)
+++ sis/branches/JDK8/core/sis-utility/pom.xml Wed Jul  8 17:45:42 2015
@@ -134,7 +134,7 @@ Miscellaneous utilities.
         <artifactId>maven-bundle-plugin</artifactId>
         <configuration>
           <instructions>
-            <Bundle-SymbolicName>org.apache.sis.utility</Bundle-SymbolicName>
+            <Bundle-SymbolicName>org.apache.sis.util</Bundle-SymbolicName>
             <Bundle-Activator>org.apache.sis.internal.system.OSGiActivator</Bundle-Activator>
           </instructions>
         </configuration>

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -30,6 +30,7 @@ import org.apache.sis.util.resources.Err
 import org.apache.sis.util.resources.Messages;
 import org.apache.sis.util.resources.IndexedResourceBundle;
 import org.apache.sis.internal.system.Semaphores;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.xml.MarshalContext;
 import org.apache.sis.xml.ValueConverter;
 import org.apache.sis.xml.ReferenceResolver;
@@ -103,7 +104,7 @@ public final class Context extends Marsh
      *
      * @see org.apache.sis.metadata.iso.ISOMetadata#LOGGER
      */
-    public static final Logger LOGGER = Logging.getLogger("org.apache.sis.xml");
+    public static final Logger LOGGER = Logging.getLogger(Loggers.XML);
 
     /**
      * Various boolean attributes determines by the above static constants.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -176,7 +176,7 @@ public final class DelayedExecutor exten
                 // Probably the 'killAll' method has been invoked.
                 // We need to test 'isKillRequested()' below.
             } catch (Throwable exception) {
-                Logging.unexpectedException(getClass(), "run", exception);
+                Logging.unexpectedException(Logging.getLogger(Loggers.SYSTEM), getClass(), "run", exception);
             }
             if (isKillRequested()) {
                 queue.clear();

Added: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Loggers.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Loggers.java?rev=1689925&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Loggers.java (added)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Loggers.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.system;
+
+
+/**
+ * Names of loggers used in SIS other than the "module-wide" loggers. We often use approximatively one logger
+ * per module, using the appropriate constant of the {@link Modules} class as the "module-wide" logger name.
+ * However we also have a few more specialized loggers, which are listed here.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.6
+ * @version 0.6
+ * @module
+ */
+public final class Loggers {
+    /**
+     * The logger for Apache SIS internal operations. The name of this logger does not match the package name
+     * of the classes using it, because this logger name does not have the {@code "internal"} part in it.
+     */
+    public static final String SYSTEM = "org.apache.sis.system";
+
+    /**
+     * The logger for operations related to XML marshalling or unmarshalling.
+     */
+    public static final String XML = "org.apache.sis.xml";
+
+    /**
+     * The logger for operations related to WKT parsing or formatting.
+     * Note that WKT formatting often occurs in different packages.
+     */
+    public static final String WKT = "org.apache.sis.io.wkt";
+
+    /**
+     * The logger for operations related to geometries.
+     */
+    public static final String GEOMETRY = "org.apache.sis.geometry";
+
+    /**
+     * The logger for metadata operation related to the ISO 19115 standard.
+     * This is a child of the logger for all metadata operations.
+     */
+    public static final String ISO_19115 = "org.apache.sis.metadata.iso";
+
+    /**
+     * The logger name for operation related to the creating of CRS objects.
+     * This is a child of the logger for all referencing operations.
+     */
+    public static final String CRS_FACTORY = "org.apache.sis.referencing.factory";
+
+    /**
+     * The logger name for operation related to coordinate operations, in particular math transforms.
+     * This is a child of the logger for all referencing operations.
+     */
+    public static final String COORDINATE_OPERATION = "org.apache.sis.referencing.operation";
+
+    /**
+     * The logger name for operation related to localization.
+     */
+    public static final String LOCALIZATION = "org.apache.sis.util.resources";
+
+    /**
+     * Do not allow instantiation of this class.
+     */
+    private Loggers() {
+    }
+}

Propchange: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Loggers.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Loggers.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Modules.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Modules.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Modules.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Modules.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -19,8 +19,17 @@ package org.apache.sis.internal.system;
 
 /**
  * Constants related to SIS modules management.
- * This class contains the OSGi module symbolic names, as declared in the {@code Bundle-SymbolicName}
- * entry of the {@code META-INF/MANIFEST.MF} file in each JAR files.
+ * The constants in this class are used for two purposes:
+ *
+ * <ul>
+ *   <li>OSGi module symbolic names, as declared in the {@code Bundle-SymbolicName} entry of the
+ *       {@code META-INF/MANIFEST.MF} file in each JAR files.</li>
+ *
+ *   <li>Logger names for "module-wide" messages, or when the message to log does not fit in a more
+ *       accurate category. Note that other logger names are listed in the {@link Loggers} class.</li>
+ * </ul>
+ *
+ * Each constant should be the name of the main package of its corresponding module.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
@@ -31,7 +40,7 @@ public final class Modules {
     /**
      * The {@value} module name.
      */
-    public static final String UTILITIES = "org.apache.sis.utility";
+    public static final String UTILITIES = "org.apache.sis.util";
 
     /**
      * The {@value} module name.
@@ -68,7 +77,7 @@ public final class Modules {
     public static final int MINOR_VERSION = 6;
 
     /**
-     * Do not allows instantiation of this class.
+     * Do not allow instantiation of this class.
      */
     private Modules() {
     }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -91,7 +91,7 @@ public abstract class OptionalDependency
             final LogRecord record = Messages.getResources(null).getLogRecord(Level.CONFIG,
                     Messages.Keys.OptionalModuleNotFound_1, dependency);
             record.setLoggerName(module);
-            Logging.log(OptionalDependency.class, "getInstance", record);
+            Logging.log(type, "getInstance", record);
             return null;
         } catch (ReflectiveOperationException exception) {
             // Should never happen if we didn't broke our helper class.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -123,7 +123,7 @@ public final class ReferenceQueueConsume
                 // Probably the 'killAll' method has been invoked.
                 // We need to test 'isKillRequested()' below.
             } catch (Throwable exception) {
-                Logging.unexpectedException(getClass(), "run", exception);
+                Logging.unexpectedException(Logging.getLogger(Loggers.SYSTEM), getClass(), "run", exception);
             }
             if (isKillRequested()) {
                 break;

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -67,7 +67,7 @@ public final class Shutdown {
             Threads.shutdown(System.nanoTime() + 4000);
         } catch (InterruptedException e) {
             if (caller != null) {
-                Logging.unexpectedException(caller, "stop", e);
+                Logging.unexpectedException(Logging.getLogger(Loggers.SYSTEM), caller, "stop", e);
             }
         }
         if (exception != null) {

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -93,10 +93,10 @@ public final class Supervisor extends St
             } catch (InstanceAlreadyExistsException e) {
                 final LogRecord record = Messages.getResources(null)
                         .getLogRecord(Level.CONFIG, Messages.Keys.AlreadyRegistered_2, "MBean", NAME);
-                record.setLoggerName("org.apache.sis");
+                record.setLoggerName(Loggers.SYSTEM);
                 Logging.log(Supervisor.class, "register", record);
             } catch (SecurityException | JMException e) {
-                Logging.unexpectedException(Logging.getLogger("org.apache.sis"), Supervisor.class, "register", e);
+                Logging.unexpectedException(Logging.getLogger(Loggers.SYSTEM), Supervisor.class, "register", e);
             }
         }
     }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Threads.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Threads.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Threads.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/Threads.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -63,7 +63,7 @@ final class Threads extends Static {
      */
     static final ThreadGroup DAEMONS = new ThreadGroup(SIS, "Daemons") {
         @Override public void uncaughtException(final Thread thread, final Throwable exception) {
-            Logging.severeException(Logging.getLogger("org.apache.sis"), thread.getClass(), "run", exception);
+            Logging.severeException(Logging.getLogger(Loggers.SYSTEM), thread.getClass(), "run", exception);
         }
     };
 

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/About.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/About.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/About.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -46,6 +46,8 @@ import org.apache.sis.util.resources.Voc
 import org.apache.sis.util.collection.TreeTable;
 import org.apache.sis.util.collection.TreeTables;
 import org.apache.sis.util.collection.DefaultTreeTable;
+import org.apache.sis.internal.system.Loggers;
+import org.apache.sis.internal.system.Modules;
 
 import static java.lang.System.getProperty;
 import static org.apache.sis.util.collection.TableColumn.NAME;
@@ -532,7 +534,7 @@ pathTree:   for (int j=0; ; j++) {
             }
         }
         if (error != null) {
-            Logging.unexpectedException(About.class, "configuration", error);
+            Logging.unexpectedException(Logging.getLogger(Modules.UTILITIES), About.class, "configuration", error);
         }
         return true;
     }
@@ -641,7 +643,7 @@ pathTree:   for (int j=0; ; j++) {
         try {
             return country ? locale.getCountry() : locale.getISO3Language();
         } catch (MissingResourceException e) {
-            Logging.recoverableException(About.class, "configuration", e);
+            Logging.recoverableException(Logging.getLogger(Loggers.LOCALIZATION), About.class, "configuration", e);
             return null;
         }
     }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -23,6 +23,7 @@ import java.nio.charset.Charset;
 import java.io.Serializable;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.logging.Logging;
+import org.apache.sis.internal.system.Modules;
 
 // Branch-dependent imports
 import java.nio.file.OpenOption;
@@ -283,7 +284,7 @@ public class OptionKey<T> implements Ser
              * we override the 'equals' and 'hashCode' methods. This option is likely to be ignored,
              * but options are expected to be optional...
              */
-            Logging.recoverableException(OptionKey.class, "readResolve", e);
+            Logging.recoverableException(Logging.getLogger(Modules.UTILITIES), OptionKey.class, "readResolve", e);
             return this;
         }
     }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -28,6 +28,7 @@ import java.util.IllformedLocaleExceptio
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import org.apache.sis.util.logging.Logging;
+import org.apache.sis.internal.system.Loggers;
 
 import static org.apache.sis.util.CharSequences.trimWhitespaces;
 import static org.apache.sis.util.collection.Containers.hashMapCapacity;
@@ -80,7 +81,7 @@ public final class Locales extends Stati
              * Not a big deal if this operation fails (this is actually just an
              * optimization for reducing memory usage). Log a warning and stop.
              */
-            Logging.unexpectedException(Locales.class, "<clinit>", exception);
+            Logging.unexpectedException(Logging.getLogger(Loggers.LOCALIZATION), Locales.class, "<clinit>", exception);
         }
     }
 

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakEntry.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakEntry.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakEntry.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakEntry.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -26,6 +26,7 @@ import org.apache.sis.util.Disposable;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.resources.Messages;
 import org.apache.sis.internal.system.ReferenceQueueConsumer;
+import org.apache.sis.internal.system.Modules;
 import org.apache.sis.math.MathFunctions;
 
 
@@ -64,7 +65,7 @@ abstract class WeakEntry<E> extends Weak
     /**
      * The logger where to logs collection events, if logging at the finest level is enabled.
      */
-    private static final Logger LOGGER = Logging.getLogger(WeakEntry.class);
+    private static final Logger LOGGER = Logging.getLogger(Modules.UTILITIES);
 
     /**
      * The next entry, or {@code null} if there is none.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultInternationalString.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultInternationalString.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultInternationalString.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultInternationalString.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -34,6 +34,7 @@ import org.apache.sis.util.ArgumentCheck
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.resources.Messages;
+import org.apache.sis.internal.system.Modules;
 
 import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
@@ -186,8 +187,8 @@ public class DefaultInternationalString
             final LogRecord record = Messages.getResources(null).getLogRecord(Level.WARNING, Messages.Keys.LocalesDiscarded);
             record.setSourceClassName("org.apache.sis.util.iso.Types");
             record.setSourceMethodName("toInternationalString");
-            record.setLoggerName("org.apache.sis.util.iso");
-            Logging.getLogger("org.apache.sis.util.iso").log(record);
+            record.setLoggerName(Modules.UTILITIES);
+            Logging.getLogger(Modules.UTILITIES).log(record);
         }
     }
 

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -40,6 +40,7 @@ import org.apache.sis.util.ArgumentCheck
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.collection.BackingStoreException;
+import org.apache.sis.internal.system.Loggers;
 
 
 /**
@@ -346,7 +347,7 @@ public final class Types extends Static
             try {
                 return super.toString(locale);
             } catch (MissingResourceException e) {
-                Logging.recoverableException(ResourceInternationalString.class, "toString", e);
+                Logging.recoverableException(Logging.getLogger(Loggers.LOCALIZATION), ResourceInternationalString.class, "toString", e);
                 return fallback();
             }
         }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -111,7 +111,7 @@ public final class Logging extends Stati
      * SIS classes typically declare a logger constant like below:
      *
      * {@preformat java
-     *     public static final Logger LOGGER = Logging.getLogger(TheClass.class);
+     *     public static final Logger LOGGER = Logging.getLogger("the.logger.name");
      * }
      *
      * Factory changes will take effect only if this method is invoked before the initialization
@@ -161,7 +161,10 @@ public final class Logging extends Stati
      *
      * @param  classe The class for which to obtain a logger.
      * @return A logger for the specified class.
+     *
+     * @deprecated Use {@link #getLogger(String)}, because the class name is sometime too close to implementation details.
      */
+    @Deprecated   // Make package-private (do not delete) after we removed from public API.
     public static Logger getLogger(Class<?> classe) {
         Class<?> outer;
         while ((outer = classe.getEnclosingClass()) != null) {
@@ -183,7 +186,7 @@ public final class Logging extends Stati
      *   <li>Unconditionally {@linkplain LogRecord#setSourceMethodName(String) set the source method name}
      *       to the given value;</li>
      *   <li>Get the logger for the {@linkplain LogRecord#getLoggerName() logger name} if specified,
-     *       or using {@link #getLogger(Class)} otherwise;</li>
+     *       or for the {@code classe} package name otherwise;</li>
      *   <li>{@linkplain LogRecord#setLoggerName(String) Set the logger name} of the given record,
      *       if not already set;</li>
      *   <li>{@linkplain Logger#log(LogRecord) Log} the modified record.</li>
@@ -208,30 +211,29 @@ public final class Logging extends Stati
     }
 
     /**
-     * Invoked when an unexpected error occurs. This method logs a message at the
-     * {@link Level#WARNING WARNING} level to the specified logger. The originating
-     * class name and method name are inferred from the error stack trace, using the
-     * first {@linkplain StackTraceElement stack trace element} for which the class
-     * name is inside a package or sub-package of the logger name. For example if
-     * the logger name is {@code "org.apache.sis.image"}, then this method will uses
-     * the first stack trace element where the fully qualified class name starts with
-     * {@code "org.apache.sis.image"} or {@code "org.apache.sis.image.io"}, but not
-     * {@code "org.apache.sis.imageio"}.
+     * Invoked when an unexpected error occurs. This method logs a message at {@link Level#WARNING} to the
+     * specified logger. The originating class name and method name are inferred from the error stack trace,
+     * using the first {@linkplain StackTraceElement stack trace element} for which the class name is inside
+     * a package or sub-package of the logger name.
+     *
+     * <div class="note"><b>Example:</b>
+     * if the logger name is {@code "org.apache.sis.image"}, then this method will uses the first stack
+     * trace element where the fully qualified class name starts with {@code "org.apache.sis.image"} or
+     * {@code "org.apache.sis.image.io"}, but not {@code "org.apache.sis.imageio"}.</div>
      *
      * @param  logger Where to log the error.
      * @param  error  The error that occurred.
      * @return {@code true} if the error has been logged, or {@code false} if the logger
-     *         doesn't log anything at {@link Level#WARNING}.
+     *         does not log anything at {@link Level#WARNING}.
      */
     public static boolean unexpectedException(final Logger logger, final Throwable error) {
         return unexpectedException(logger, null, null, error, Level.WARNING);
     }
 
     /**
-     * Invoked when an unexpected error occurs. This method logs a message at the
-     * {@link Level#WARNING WARNING} level to the specified logger. The originating
-     * class name and method name can optionally be specified. If any of them is
-     * {@code null}, then it will be inferred from the error stack trace as in
+     * Invoked when an unexpected error occurs. This method logs a message at {@link Level#WARNING}
+     * to the specified logger. The originating class name and method name can optionally be specified.
+     * If any of them is {@code null}, then it will be inferred from the error stack trace as in
      * {@link #unexpectedException(Logger, Throwable)}.
      *
      * <p>Explicit value for class and method names are sometime preferred to automatic
@@ -252,7 +254,7 @@ public final class Logging extends Stati
      * @param method  The method where the error occurred, or {@code null}.
      * @param error   The error.
      * @return {@code true} if the error has been logged, or {@code false} if the logger
-     *         doesn't log anything at {@link Level#WARNING}.
+     *         does not log anything at {@link Level#WARNING}.
      *
      * @see #recoverableException(Logger, Class, String, Throwable)
      * @see #severeException(Logger, Class, String, Throwable)
@@ -275,7 +277,11 @@ public final class Logging extends Stati
      *         doesn't log anything at {@link Level#WARNING}.
      *
      * @see #recoverableException(Class, String, Throwable)
+     *
+     * @deprecated A logger should be specified explicitely with
+     * {@link #unexpectedException(Logger, Class, String, Throwable)}.
      */
+    @Deprecated
     public static boolean unexpectedException(Class<?> classe, String method, Throwable error) {
         return unexpectedException((Logger) null, classe, method, error);
     }
@@ -415,6 +421,7 @@ public final class Logging extends Stati
      * {@code jre/lib/logging.properties} file is illegal, then {@link MonolineFormatter} will log
      * this problem and use a default time pattern.</div>
      *
+     * @param logger  Where to log the error.
      * @param classe  The class where the error occurred.
      * @param method  The method name where the error occurred.
      * @param error   The error.
@@ -423,9 +430,9 @@ public final class Logging extends Stati
      *
      * @see #unexpectedException(Class, String, Throwable)
      */
-    static boolean configurationException(final Class<?> classe, final String method, final Throwable error) {
+    static boolean configurationException(final Logger logger, final Class<?> classe, final String method, final Throwable error) {
         final String classname = (classe != null) ? classe.getName() : null;
-        return unexpectedException(null, classname, method, error, Level.CONFIG);
+        return unexpectedException(logger, classname, method, error, Level.CONFIG);
     }
 
     /**
@@ -440,22 +447,26 @@ public final class Logging extends Stati
      *         doesn't log anything at {@link Level#FINE}.
      *
      * @see #unexpectedException(Class, String, Throwable)
+     *
+     * @deprecated A logger should be specified explicitely with
+     * {@link #recoverableException(Logger, Class, String, Throwable)}.
      */
+    @Deprecated
     public static boolean recoverableException(final Class<?> classe, final String method, final Throwable error) {
         return recoverableException(null, classe, method, error);
     }
 
     /**
      * Invoked when a recoverable error occurs. This method is similar to
-     * {@link #unexpectedException(Logger,Class,String,Throwable) unexpectedException}
-     * except that it doesn't log the stack trace and uses a lower logging level.
+     * {@link #unexpectedException(Logger,Class,String,Throwable) unexpectedException(…)}
+     * except that it does not log the stack trace and uses a lower logging level.
      *
      * @param logger  Where to log the error.
      * @param classe  The class where the error occurred.
      * @param method  The method name where the error occurred.
      * @param error   The error.
      * @return {@code true} if the error has been logged, or {@code false} if the logger
-     *         doesn't log anything at {@link Level#FINE}.
+     *         does not log anything at {@link Level#FINE}.
      *
      * @see #unexpectedException(Logger, Class, String, Throwable)
      * @see #severeException(Logger, Class, String, Throwable)

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -31,6 +31,7 @@ import java.util.SortedMap;
 import java.util.Comparator;
 import java.util.ResourceBundle;
 import java.util.logging.*;
+import org.apache.sis.internal.system.Modules;
 import org.apache.sis.internal.system.OS;
 import org.apache.sis.internal.util.X364;
 import org.apache.sis.io.IO;
@@ -292,12 +293,12 @@ public class MonolineFormatter extends F
         try {
             timeFormat(manager.getProperty(classname + ".time"));
         } catch (IllegalArgumentException exception) {
-            Logging.configurationException(MonolineFormatter.class, "<init>", exception);
+            Logging.configurationException(Logging.getLogger(Modules.UTILITIES), MonolineFormatter.class, "<init>", exception);
         }
         try {
             sourceFormat(manager.getProperty(classname + ".source"));
         } catch (IllegalArgumentException exception) {
-            Logging.configurationException(MonolineFormatter.class, "<init>", exception);
+            Logging.configurationException(Logging.getLogger(Modules.UTILITIES), MonolineFormatter.class, "<init>", exception);
         }
         /*
          * Applies the default set of colors only if the handler is writing to the console.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -40,6 +40,7 @@ import org.apache.sis.util.Exceptions;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.iso.Types;
 import org.apache.sis.util.logging.Logging;
+import org.apache.sis.internal.system.Loggers;
 
 
 /**
@@ -287,6 +288,7 @@ public class IndexedResourceBundle exten
                     final String    baseName   = getClass().getCanonicalName();
                     final String    methodName = (key != null) ? "getObject" : "getKeys";
                     final LogRecord record     = new LogRecord(Level.FINER, "Loaded resources for {0} from bundle \"{1}\".");
+                    record.setLoggerName(Loggers.LOCALIZATION);
                     /*
                      * Loads resources from the UTF file.
                      */
@@ -357,7 +359,7 @@ public class IndexedResourceBundle exten
                 keyID = getKeyConstants().getKeyValue(key);
             } catch (ReflectiveOperationException e) {
                 e.addSuppressed(exception);
-                Logging.recoverableException(getClass(), "handleGetObject", e);
+                Logging.recoverableException(Logging.getLogger(Loggers.LOCALIZATION), getClass(), "handleGetObject", e);
                 return null; // This is okay as of 'handleGetObject' contract.
             }
         }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/LegacyCodes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/LegacyCodes.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/LegacyCodes.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/LegacyCodes.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -23,6 +23,7 @@ import java.util.Properties;
 import java.io.InputStream;
 import java.io.IOException;
 import org.opengis.metadata.Metadata;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.util.collection.Containers;
 import org.apache.sis.util.logging.Logging;
 
@@ -53,7 +54,7 @@ final class LegacyCodes {
         try (InputStream in = Metadata.class.getResourceAsStream("2003/charset-codes.properties")) {
             codes.load(in);
         } catch (IOException e) {
-            Logging.unexpectedException(ValueConverter.class, "toCharset[Code]", e);
+            Logging.unexpectedException(Logging.getLogger(Loggers.XML), ValueConverter.class, "toCharset[Code]", e);
         }
         final int capacity = Containers.hashMapCapacity(codes.size());
         IANA_TO_LEGACY = new HashMap<>(capacity);

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/MarshallerPool.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/MarshallerPool.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/MarshallerPool.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/MarshallerPool.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -26,6 +26,7 @@ import javax.xml.bind.JAXBException;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 import org.apache.sis.util.logging.Logging;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.system.DelayedExecutor;
 import org.apache.sis.internal.system.DelayedRunnable;
 import org.apache.sis.internal.jaxb.AdapterReplacement;
@@ -243,7 +244,7 @@ public class MarshallerPool {
         } catch (JAXBException exception) {
             // Not expected to happen because we are supposed
             // to reset the properties to their initial values.
-            Logging.unexpectedException(MarshallerPool.class, "recycle", exception);
+            Logging.unexpectedException(Logging.getLogger(Loggers.XML), MarshallerPool.class, "recycle", exception);
             return;
         }
         queue.push(marshaller);

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/XLink.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/XLink.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/XLink.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/XLink.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -27,6 +27,7 @@ import org.opengis.util.InternationalStr
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.resources.Errors;
+import org.apache.sis.internal.system.Loggers;
 
 // Branch-dependent imports
 import java.util.Objects;
@@ -870,7 +871,7 @@ public class XLink implements Serializab
             } catch (NoSuchFieldException e) {
                 // Should never happen with Enums. But if it
                 // happen anyway, this is not a fatal error.
-                Logging.unexpectedException(XLink.class, "toString", e);
+                Logging.unexpectedException(Logging.getLogger(Loggers.XML), XLink.class, "toString", e);
             }
             buffer.append(label).append("=\"").append(value).append('"');
         }

Added: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/system/LoggersTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/system/LoggersTest.java?rev=1689925&view=auto
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/system/LoggersTest.java (added)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/system/LoggersTest.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.system;
+
+import org.apache.sis.test.TestCase;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+
+/**
+ * Verifies some constants declared in {@link Loggers} class.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.6
+ * @version 0.6
+ * @module
+ */
+public final strictfp class LoggersTest extends TestCase {
+    /**
+     * Verifies some logger names.
+     */
+    @Test
+    public void verifyLoggerNames() {
+        assertTrue(Loggers.ISO_19115,            Loggers.ISO_19115           .startsWith(Modules.METADATA    + '.'));
+        assertTrue(Loggers.CRS_FACTORY,          Loggers.CRS_FACTORY         .startsWith(Modules.REFERENCING + '.'));
+        assertTrue(Loggers.COORDINATE_OPERATION, Loggers.COORDINATE_OPERATION.startsWith(Modules.REFERENCING + '.'));
+        assertTrue(Loggers.LOCALIZATION,         Loggers.LOCALIZATION        .startsWith(Modules.UTILITIES   + '.'));
+    }
+}

Propchange: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/system/LoggersTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/system/LoggersTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -24,6 +24,7 @@ import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.io.OutputStreamWriter;
 import java.io.UnsupportedEncodingException;
+import org.apache.sis.internal.system.Modules;
 import org.apache.sis.util.logging.Logging;
 import org.junit.runner.RunWith;
 
@@ -149,7 +150,7 @@ public abstract strictfp class TestCase
                 }
             }
         } catch (UnsupportedEncodingException e) {
-            Logging.recoverableException(TestCase.class, "<clinit>", e);
+            Logging.recoverableException(LOGGER, TestCase.class, "<clinit>", e);
         }
         LOGGER.addHandler(LogRecordCollector.INSTANCE);
     }

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -36,6 +36,7 @@ import org.junit.BeforeClass;
     org.apache.sis.internal.test.XMLComparatorTest.class,
 
     // Most basic functions of SIS library.
+    org.apache.sis.internal.system.LoggersTest.class,
     org.apache.sis.internal.util.NumericsTest.class,
     org.apache.sis.setup.OptionKeyTest.class,
     org.apache.sis.util.ArraysExtTest.class,

Modified: sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java [UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -168,8 +168,7 @@ public class NetcdfStoreProvider extends
                          * in which case UCAR tries to open it as a file even if it is not a file. For example
                          * we get this exception for "jar:file:/file.jar!/entry.nc".
                          */
-                        Logging.recoverableException(
-                                Logging.getLogger("org.apache.sis.storage"), netcdfFileClass, "canOpen", cause);
+                        Logging.recoverableException(Logging.getLogger(Modules.NETCDF), netcdfFileClass, "canOpen", cause);
                         return ProbeResult.UNSUPPORTED_STORAGE;
                     }
                     throw new DataStoreException(e); // The cause may be IOException.

Modified: sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/TestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/TestCase.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/TestCase.java [UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/TestCase.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -24,6 +24,7 @@ import java.io.IOException;
 import java.lang.reflect.UndeclaredThrowableException;
 import org.apache.sis.util.logging.EmptyWarningListeners;
 import org.apache.sis.internal.netcdf.ucar.DecoderWrapper;
+import org.apache.sis.internal.system.Modules;
 import org.opengis.wrapper.netcdf.IOTestCase;
 import ucar.nc2.dataset.NetcdfDataset;
 import org.junit.AfterClass;
@@ -46,7 +47,7 @@ public abstract strictfp class TestCase
      * A dummy list of listeners which can be given to the {@link Decoder} constructor.
      */
     public static EmptyWarningListeners<Decoder> LISTENERS =
-            new EmptyWarningListeners<>("org.apache.sis.storage.netcdf");
+            new EmptyWarningListeners<>(Modules.NETCDF);
 
     /**
      * The {@code searchPath} argument value to be given to the {@link Decoder#setSearchPath(String[])}

Modified: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/IOUtilities.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/IOUtilities.java?rev=1689925&r1=1689924&r2=1689925&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/IOUtilities.java [UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/IOUtilities.java [UTF-8] Wed Jul  8 17:45:42 2015
@@ -38,6 +38,7 @@ import org.apache.sis.util.CharSequences
 import org.apache.sis.util.Exceptions;
 import org.apache.sis.util.Static;
 import org.apache.sis.util.resources.Errors;
+import org.apache.sis.internal.system.Modules;
 
 // Branch-dependent imports
 import java.nio.file.Path;
@@ -528,7 +529,7 @@ public final class IOUtilities extends S
                     // We have been able to create a channel, maybe not with the given OpenOptions.
                     // But the exception was nevertheless unexpected, so log its stack trace in order
                     // to allow the developer to check if there is something wrong.
-                    Logging.unexpectedException(Logging.getLogger("org.apache.sis.storage"), IOUtilities.class, "open", e);
+                    Logging.unexpectedException(Logging.getLogger(Modules.STORAGE), IOUtilities.class, "open", e);
                     return channel;
                 }
             }
@@ -552,6 +553,6 @@ public final class IOUtilities extends S
      * the exception at {@link java.util.logging.Level#FINE} without stack trace.
      */
     private static void recoverableException(final Exception warning) {
-        Logging.recoverableException(Logging.getLogger("org.apache.sis.storage"), IOUtilities.class, "open", warning);
+        Logging.recoverableException(Logging.getLogger(Modules.STORAGE), IOUtilities.class, "open", warning);
     }
 }



Mime
View raw message