sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1493692 - in /sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis: setup/ util/logging/ util/resources/
Date Mon, 17 Jun 2013 09:30:16 GMT
Author: desruisseaux
Date: Mon Jun 17 09:30:16 2013
New Revision: 1493692

URL: http://svn.apache.org/r1493692
Log:
Reports the logging implementation.

Modified:
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLoggerFactory.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/setup/About.java?rev=1493692&r1=1493691&r2=1493692&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/setup/About.java [UTF-8]
(original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/setup/About.java [UTF-8]
Mon Jun 17 09:30:16 2013
@@ -41,6 +41,7 @@ import org.apache.sis.util.ArgumentCheck
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Version;
 import org.apache.sis.util.logging.Logging;
+import org.apache.sis.util.logging.LoggerFactory;
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.util.collection.TreeTable;
 import org.apache.sis.util.collection.TreeTables;
@@ -98,6 +99,11 @@ public enum About {
     LOCALIZATION(Vocabulary.Keys.Localization),
 
     /**
+     * Information about logging.
+     */
+    LOGGING(Vocabulary.Keys.Logging),
+
+    /**
      * Information about user home directory, java installation directory or other kind of
data.
      * This section includes:
      *
@@ -276,6 +282,15 @@ fill:   for (int i=0; ; i++) {
                     break;
                 }
                 case 7: {
+                    newSection = LOGGING;
+                    if (sections.contains(LOGGING)) {
+                        nameKey = Vocabulary.Keys.Implementation;
+                        final LoggerFactory<?> factory = Logging.getLoggerFactory();
+                        value = (factory != null) ? factory.getName() : "java.util.logging";
+                    }
+                    break;
+                }
+                case 8: {
                     newSection = PATHS;
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.UserHome;
@@ -283,28 +298,28 @@ fill:   for (int i=0; ; i++) {
                     }
                     break;
                 }
-                case 8: {
+                case 9: {
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.CurrentDirectory;
                         value = getProperty("user.dir");
                     }
                     break;
                 }
-                case 9: {
+                case 10: {
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.TemporaryFiles;
                         value = getProperty("java.io.tmpdir");
                     }
                     break;
                 }
-                case 10: {
+                case 11: {
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.JavaHome;
                         value = javaHome = getProperty("java.home");
                     }
                     break;
                 }
-                case 11: {
+                case 12: {
                     newSection = LIBRARIES;
                     if (sections.contains(LIBRARIES)) {
                         nameKey = Vocabulary.Keys.JavaExtensions;
@@ -312,7 +327,7 @@ fill:   for (int i=0; ; i++) {
                     }
                     break;
                 }
-                case 12: {
+                case 13: {
                     if (sections.contains(LIBRARIES)) {
                         nameKey = Vocabulary.Keys.Classpath;
                         value = classpath(getProperty("java.class.path"), null, false, null);

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLoggerFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLoggerFactory.java?rev=1493692&r1=1493691&r2=1493692&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLoggerFactory.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLoggerFactory.java
[UTF-8] Mon Jun 17 09:30:16 2013
@@ -47,6 +47,14 @@ final class DualLoggerFactory extends Lo
     }
 
     /**
+     * Returns a comma-separated list of the logging frameworks.
+     */
+    @Override
+    public String getName() {
+        return first.getName() + ", " + second.getName();
+    }
+
+    /**
      * Returns the implementation to use for the logger of the specified name,
      * or {@code null} if the logger would delegates to Java logging anyway.
      */

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java?rev=1493692&r1=1493691&r2=1493692&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java
[UTF-8] Mon Jun 17 09:30:16 2013
@@ -74,6 +74,13 @@ public abstract class LoggerFactory<L> {
     }
 
     /**
+     * Returns the name of the logging framework.
+     *
+     * @return The logging framework name.
+     */
+    public abstract String getName();
+
+    /**
      * Returns the logger of the specified name, or {@code null} if the JDK logging framework
      * should be used.
      *

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java?rev=1493692&r1=1493691&r2=1493692&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
[UTF-8] Mon Jun 17 09:30:16 2013
@@ -135,6 +135,11 @@ public final class Vocabulary extends In
         public static final int Identifier = 42;
 
         /**
+         * Implementation
+         */
+        public static final int Implementation = 52;
+
+        /**
          * Index
          */
         public static final int Index = 44;
@@ -175,6 +180,11 @@ public final class Vocabulary extends In
         public static final int Localization = 19;
 
         /**
+         * Logging
+         */
+        public static final int Logging = 51;
+
+        /**
          * Longitude
          */
         public static final int Longitude = 41;

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties?rev=1493692&r1=1493691&r2=1493692&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
[ISO-8859-1] Mon Jun 17 09:30:16 2013
@@ -30,6 +30,7 @@ Destination        = Destination
 Dimensions         = Dimensions
 Directory          = Directory
 Identifier         = Identifier
+Implementation     = Implementation
 Index              = Index
 JavaExtensions     = Java extensions
 JavaHome           = Java home directory
@@ -39,6 +40,7 @@ Libraries          = Libraries
 LocalConfiguration = Local configuration
 Locale             = Locale
 Localization       = Localization
+Logging            = Logging
 MaximumValue       = Maximum value
 MeanValue          = Mean value
 MinimumValue       = Minimum value

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties?rev=1493692&r1=1493691&r2=1493692&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
[ISO-8859-1] Mon Jun 17 09:30:16 2013
@@ -30,6 +30,7 @@ Destination        = Destination
 Dimensions         = Dimensions
 Directory          = R\u00e9pertoire
 Identifier         = Identifiant
+Implementation     = Impl\u00e9mentation
 Index              = Index
 JavaExtensions     = Extensions du Java
 JavaHome           = R\u00e9pertoire du Java
@@ -39,6 +40,7 @@ Libraries          = Biblioth\u00e8ques
 LocalConfiguration = Configuration locale
 Locale             = Locale
 Localization       = R\u00e9gionalisation
+Logging            = Journalisation
 MaximumValue       = Valeur maximale
 MeanValue          = Valeur moyenne
 MinimumValue       = Valeur minimale



Mime
View raw message