You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2022/11/29 19:08:42 UTC

[sis] 02/03: Retrofit `sis-console/artifact` into `sis-javafx/artifact`. The intent is to have a single source for the packaging of SIS binaries. `sis-console/artifact` was slightly obsolete compared to `sis-javafx/artifact`.

This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 67f57a8f3774166b17a5aea4ec0614474faf4f8f
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Tue Nov 29 14:21:48 2022 +0100

    Retrofit `sis-console/artifact` into `sis-javafx/artifact`.
    The intent is to have a single source for the packaging of SIS binaries.
    `sis-console/artifact` was slightly obsolete compared to `sis-javafx/artifact`.
---
 application/sis-console/pom.xml                    |  23 ----
 application/sis-console/src/main/artifact/LICENSE  |   1 -
 application/sis-console/src/main/artifact/NOTICE   |   1 -
 application/sis-console/src/main/artifact/README   |  98 ---------------
 .../src/main/artifact/conf/logging.properties      |  63 ----------
 .../sis-console/src/main/artifact/data/README      |  10 --
 .../sis-console/src/main/artifact/lib/README       |   8 --
 .../sis-console/src/main/artifact/log/README       |   1 -
 application/sis-javafx/src/main/artifact/README    |   4 +-
 .../src/main/artifact/bin/sis                      |   4 +-
 .../src/main/artifact/bin/{sisfx.bat => sis.bat}   |  21 +---
 application/sis-javafx/src/main/artifact/bin/sisfx |   2 +-
 .../sis-javafx/src/main/artifact/bin/sisfx.bat     |   2 +-
 .../src/main/artifact/conf/logging.properties      |   7 +-
 .../sis-javafx/src/main/artifact/data/README       |  11 +-
 .../sis-javafx/src/main/artifact/log/README        |   2 +-
 .../sis/internal/setup/LoggingConfiguration.java   |  94 ---------------
 .../org/apache/sis/internal/maven/Assembler.java   |   8 +-
 .../apache/sis/internal/system/package-info.java   |   2 +-
 .../org/apache/sis/util/logging/Initializer.java   | 133 +++++++++++++++++++++
 20 files changed, 164 insertions(+), 331 deletions(-)

diff --git a/application/sis-console/pom.xml b/application/sis-console/pom.xml
index 050ab663db..26c640bc56 100644
--- a/application/sis-console/pom.xml
+++ b/application/sis-console/pom.xml
@@ -86,29 +86,6 @@
     </plugins>
   </build>
 
-  <!-- Create the binary distribution file. -->
-  <profiles>
-    <profile>
-      <id>apache-release</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.sis.core</groupId>
-            <artifactId>sis-build-helper</artifactId>
-            <version>${sis.plugin.version}</version>
-            <executions>
-              <execution>
-                <goals>
-                  <goal>dist</goal>
-                </goals>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
 
   <!-- ===========================================================
            Dependencies
diff --git a/application/sis-console/src/main/artifact/LICENSE b/application/sis-console/src/main/artifact/LICENSE
deleted file mode 120000
index 2a64f9d0fc..0000000000
--- a/application/sis-console/src/main/artifact/LICENSE
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../LICENSE
\ No newline at end of file
diff --git a/application/sis-console/src/main/artifact/NOTICE b/application/sis-console/src/main/artifact/NOTICE
deleted file mode 120000
index 1fb52812be..0000000000
--- a/application/sis-console/src/main/artifact/NOTICE
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../NOTICE
\ No newline at end of file
diff --git a/application/sis-console/src/main/artifact/README b/application/sis-console/src/main/artifact/README
deleted file mode 100644
index 55fd57398a..0000000000
--- a/application/sis-console/src/main/artifact/README
+++ /dev/null
@@ -1,98 +0,0 @@
-==============================================
-Welcome to Apache SIS <https://sis.apache.org>
-==============================================
-
-SIS is a project of the Apache Software Foundation <https://www.apache.org>
-for developing geospatial applications in the Java programming language.
-The library can be used for desktop or server applications.
-
-Apache SIS, SIS, Apache, the Apache feather logo, and the Apache SIS
-project logo are trademarks of The Apache Software Foundation.
-
-
-Installation
-============
-
-SIS requires Java 8 or later.
-
-Unix
-----
-1) Unzip `apache-sis-1.3-bin.zip` in any directory.
-2) Add the `apache-sis-1.3/bin` directory to the path.
-3) Invoke `sis` on the command line.
-
-Windows
--------
-There is not yet `sis.bat` file for Windows.
-The following steps need to be done manually:
-
-1) Unzip `apache-sis-1.3-bin.zip` in any directory.
-2) Invoke `java -jar lib/sis.jar` on the command line.
-
-
-Configuration (Unix only)
-=========================
-
-A `SIS_OPTS` environment variable can optionally be set for specifying options
-to be given to any execution of Apache SIS. For example for setting the
-encoding to UTF-8:
-
-    export SIS_OPTS="--encoding UTF-8"
-
-Optional dependencies can be added to the `lib` folder. For example adding the
-UCAR netCDF library in the `lib` folder will cause Apache SIS to decode a
-wider range of file formats like NcML files.
-
-
-License (see also LICENSE)
-==========================
-
-Collective work: Copyright 2010-2022 The Apache Software Foundation.
-
-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.
-
-Apache SIS includes a number of subcomponents with separate copyright
-notices and license terms. Your use of these subcomponents is subject to
-the terms and conditions of the licenses listed in the LICENSE file.
-
-
-Mailing Lists
-=============
-
-Discussion about SIS takes place on the following mailing lists:
-
-    user@sis.apache.org    - About using SIS
-    dev@sis.apache.org     - About developing SIS
-
-Notification on all code changes are sent to the following mailing list:
-
-    commits@sis.apache.org
-
-The mailing lists are open to anyone and publicly archived.
-
-You can subscribe the mailing lists by sending a message to
-<LIST>-subscribe@sis.apache.org (for example user-subscribe@...).
-To unsubscribe, send a message to <LIST>-unsubscribe@sis.apache.org.
-For more instructions, send a message to <LIST>-help@sis.apache.org.
-
-
-Issue Tracker
-=============
-
-If you encounter errors in SIS or want to suggest an improvement or
-a new feature, please visit the SIS issue tracker at
-https://issues.apache.org/jira/browse/SIS There you can also find the
-latest information on known issues and recent bug fixes and enhancements.
diff --git a/application/sis-console/src/main/artifact/conf/logging.properties b/application/sis-console/src/main/artifact/conf/logging.properties
deleted file mode 100644
index 95c0f0dee3..0000000000
--- a/application/sis-console/src/main/artifact/conf/logging.properties
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-# Logging configuration file for Apache SIS command line.
-#
-# This file is similar to the default configuration file
-# provided in Java installation directory,  but contains
-# configuration that are specific to Apache SIS library.
-# The default configuration file is located at:
-#
-#   - $JAVA_HOME/jre/lib/logging.properties  before Java 9
-#   - $JAVA_HOME/conf/logging.properties     since Java 9
-#
-# This file can be freely edited as documented below,
-# or as documented in the above-cited standard files.
-#
-
-
-# Comma separated list of log Handler classes.
-# Handlers specify where the logs will be sent.
-# Some available handlers are:
-#
-#   - java.util.logging.ConsoleHandler
-#   - java.util.logging.FileHandler
-#   - java.util.logging.SocketHandler
-#
-# See their javadoc for more information on those handlers.
-
-handlers = java.util.logging.ConsoleHandler
-
-
-# Filter the log records according their logging levels.
-# Each package can have its logs filtered at a different level.
-# By default Apache SIS logs at levels CONFIG and above will be
-# shown, while only levels INFO and above will be shown for other
-# packages. Furthermore, the ConsoleHandler also has a separate level
-# setting to limit messages printed to the console.
-
-.level = INFO
-org.apache.sis.level = CONFIG
-java.util.logging.ConsoleHandler.level = INFO
-
-
-# Appearance of log messages. Some available formatters are:
-#
-#   - java.util.logging.XMLFormatter
-#   - java.util.logging.SimpleFormatter
-#   - org.apache.sis.util.logging.MonolineFormatter
-#
-# By default, the Apache SIS formatter displays only the level
-# and the message. Additional fields can be specified here:
-#
-# time:   If set, writes the time elapsed since the initialization.
-#         The argument specifies the output pattern. For example,
-#         the pattern HH:mm:ss.SSSS displays the hours, minutes,
-#         seconds and milliseconds.
-#
-# source: If set, writes the source logger or the source class name.
-#         The argument specifies the type of source to display.
-#         Valid values are none, logger:short, logger:long,
-#         "class:short", "class:long" and "class.method".
-
-java.util.logging.ConsoleHandler.formatter = org.apache.sis.util.logging.MonolineFormatter
-org.apache.sis.util.logging.MonolineFormatter.source = logger:long
-org.apache.sis.util.logging.MonolineFormatter.colors = true
diff --git a/application/sis-console/src/main/artifact/data/README b/application/sis-console/src/main/artifact/data/README
deleted file mode 100644
index f318762ab8..0000000000
--- a/application/sis-console/src/main/artifact/data/README
+++ /dev/null
@@ -1,10 +0,0 @@
-This directory is the default location of Apache SIS data.
-If desired, an alternative location can be defined with the
-SIS_DATA environment variable. Example:
-
-    export SIS_DATA=/my/data/directory
-
-The following sub-directories will be created when first needed:
-
-  - Databases
-  - DatumChanges
diff --git a/application/sis-console/src/main/artifact/lib/README b/application/sis-console/src/main/artifact/lib/README
deleted file mode 100644
index 6b4930b434..0000000000
--- a/application/sis-console/src/main/artifact/lib/README
+++ /dev/null
@@ -1,8 +0,0 @@
-This directory contains the sis.jar file together with optional dependencies.
-Recognized optional dependencies are:
-
-  - Derby database
-  - JAXB implementation
-  - UCAR netCDF library
-  - ESRI Geometry API
-  - Java Topology Suite
diff --git a/application/sis-console/src/main/artifact/log/README b/application/sis-console/src/main/artifact/log/README
deleted file mode 100644
index 1f583233a2..0000000000
--- a/application/sis-console/src/main/artifact/log/README
+++ /dev/null
@@ -1 +0,0 @@
-This directory contains the log messages produced by the Derby driver.
diff --git a/application/sis-javafx/src/main/artifact/README b/application/sis-javafx/src/main/artifact/README
index e89965953a..4f18b53f88 100644
--- a/application/sis-javafx/src/main/artifact/README
+++ b/application/sis-javafx/src/main/artifact/README
@@ -7,7 +7,7 @@ for developing geospatial applications in the Java programming language.
 The library can be used for desktop or server applications.
 
 Apache SIS, SIS, Apache, the Apache feather logo, and the Apache SIS
-project logo are trademarks of The Apache Software Foundation.
+project logo are trademarks of The Apache Software Foundation (ASF).
 
 
 Installation
@@ -27,7 +27,7 @@ Configuration (Unix only)
 
 A `SIS_OPTS` environment variable can optionally be set for specifying options
 to be given to any execution of Apache SIS. For example for setting the
-encoding to UTF-8:
+encoding to UTF-8 in the console application:
 
     export SIS_OPTS="--encoding UTF-8"
 
diff --git a/application/sis-console/src/main/artifact/bin/sis b/application/sis-javafx/src/main/artifact/bin/sis
similarity index 92%
rename from application/sis-console/src/main/artifact/bin/sis
rename to application/sis-javafx/src/main/artifact/bin/sis
index b0fd28f18a..f91aaab288 100755
--- a/application/sis-console/src/main/artifact/bin/sis
+++ b/application/sis-javafx/src/main/artifact/bin/sis
@@ -18,13 +18,13 @@
 
 set -o errexit
 
-BASE_DIR="`readlink --canonicalize-existing $0`"
-BASE_DIR="`dirname $BASE_DIR`/.."
+BASE_DIR="`dirname $0`/.."
 SIS_DATA="${SIS_DATA:-$BASE_DIR/data}"
 export SIS_DATA
 
 # Execute SIS with any optional JAR that the user may put in the 'lib' directory.
 java -classpath "$BASE_DIR/lib/sis-console-2.0-SNAPSHOT.jar" \
+     -Djava.util.logging.config.class="org.apache.sis.util.logging.Initializer" \
      -Djava.util.logging.config.file="$BASE_DIR/conf/logging.properties" \
      -Dderby.stream.error.file="$BASE_DIR/log/derby.log" \
      org.apache.sis.console.Command $SIS_OPTS "$@"
diff --git a/application/sis-javafx/src/main/artifact/bin/sisfx.bat b/application/sis-javafx/src/main/artifact/bin/sis.bat
similarity index 55%
copy from application/sis-javafx/src/main/artifact/bin/sisfx.bat
copy to application/sis-javafx/src/main/artifact/bin/sis.bat
index 04affb29d5..a71f977170 100644
--- a/application/sis-javafx/src/main/artifact/bin/sisfx.bat
+++ b/application/sis-javafx/src/main/artifact/bin/sis.bat
@@ -17,20 +17,11 @@ REM limitations under the License.
 
 
 SET BASE_DIR=%~dp0\..
-CALL "%BASE_DIR%\conf\setenv.bat"
 SET SIS_DATA=%BASE_DIR%\data
 
-IF "%PATH_TO_FX%"=="" (
-    java --class-path "%BASE_DIR%\lib\*" org.apache.sis.internal.setup.FXFinder "%BASE_DIR%\conf\setenv.bat"
-    IF %ERRORLEVEL% GEQ 1 EXIT /B 1
-    CALL "%BASE_DIR%\conf\setenv.bat"
-)
-
-java -splash:"%BASE_DIR%\lib\logo.jpg"^
- --add-modules javafx.graphics,javafx.controls,javafx.web^
- --module-path "%PATH_TO_FX%"^
- --class-path "%BASE_DIR%\lib\sis-javafx-2.0-SNAPSHOT.jar"^
- -Djava.util.logging.config.class=org.apache.sis.internal.setup.LoggingConfiguration^
- -Djava.util.logging.config.file="%BASE_DIR%\conf\logging.properties"^
- -Dderby.stream.error.file="%BASE_DIR%\log\derby.log"^
- org.apache.sis.gui.DataViewer %SIS_OPTS%
+REM Execute SIS with any optional JAR that the user may put in the 'lib' directory.
+java -classpath "%BASE_DIR%\lib\sis-console-2.0-SNAPSHOT.jar"^
+     -Djava.util.logging.config.class=org.apache.sis.util.logging.Initializer^
+     -Djava.util.logging.config.file="%BASE_DIR%\conf\logging.properties"^
+     -Dderby.stream.error.file="%BASE_DIR%\log\derby.log"^
+     org.apache.sis.console.Command %SIS_OPTS% %*
diff --git a/application/sis-javafx/src/main/artifact/bin/sisfx b/application/sis-javafx/src/main/artifact/bin/sisfx
index 1439fff62f..a24781167d 100755
--- a/application/sis-javafx/src/main/artifact/bin/sisfx
+++ b/application/sis-javafx/src/main/artifact/bin/sisfx
@@ -39,7 +39,7 @@ java -splash:"$BASE_DIR/lib/logo.jpg" \
      --add-modules javafx.graphics,javafx.controls,javafx.web \
      --module-path "$PATH_TO_FX" \
      --class-path "$BASE_DIR/lib/sis-javafx-2.0-SNAPSHOT.jar" \
-     -Djava.util.logging.config.class="org.apache.sis.internal.setup.LoggingConfiguration" \
+     -Djava.util.logging.config.class="org.apache.sis.util.logging.Initializer" \
      -Djava.util.logging.config.file="$BASE_DIR/conf/logging.properties" \
      -Dderby.stream.error.file="$BASE_DIR/log/derby.log" \
      org.apache.sis.gui.DataViewer $SIS_OPTS "$@"
diff --git a/application/sis-javafx/src/main/artifact/bin/sisfx.bat b/application/sis-javafx/src/main/artifact/bin/sisfx.bat
index 04affb29d5..08887fe358 100644
--- a/application/sis-javafx/src/main/artifact/bin/sisfx.bat
+++ b/application/sis-javafx/src/main/artifact/bin/sisfx.bat
@@ -30,7 +30,7 @@ java -splash:"%BASE_DIR%\lib\logo.jpg"^
  --add-modules javafx.graphics,javafx.controls,javafx.web^
  --module-path "%PATH_TO_FX%"^
  --class-path "%BASE_DIR%\lib\sis-javafx-2.0-SNAPSHOT.jar"^
- -Djava.util.logging.config.class=org.apache.sis.internal.setup.LoggingConfiguration^
+ -Djava.util.logging.config.class=org.apache.sis.util.logging.Initializer^
  -Djava.util.logging.config.file="%BASE_DIR%\conf\logging.properties"^
  -Dderby.stream.error.file="%BASE_DIR%\log\derby.log"^
  org.apache.sis.gui.DataViewer %SIS_OPTS%
diff --git a/application/sis-javafx/src/main/artifact/conf/logging.properties b/application/sis-javafx/src/main/artifact/conf/logging.properties
index cd968f661d..95b2fa71fa 100644
--- a/application/sis-javafx/src/main/artifact/conf/logging.properties
+++ b/application/sis-javafx/src/main/artifact/conf/logging.properties
@@ -32,12 +32,12 @@ handlers = java.util.logging.FileHandler, \
 # collect those records in the system monitor window:
 #
 #   - By package (FINER for SIS, CONFIG for everything else).
-#   - By handler (WARNING for console, FINE for log file).
+#   - By handler (INFO for console, FINE for log file).
 
 .level = CONFIG
 org.apache.sis.level = FINER
 java.util.logging.FileHandler.level = FINE
-java.util.logging.ConsoleHandler.level = WARNING
+java.util.logging.ConsoleHandler.level = INFO
 
 
 # Appearance of log messages. Some available formatters are:
@@ -62,8 +62,7 @@ java.util.logging.ConsoleHandler.level = WARNING
 #         Valid argument values are "none", "logger:short", "logger:long",
 #         "class:short", "class:long" and "class.method".
 
-java.util.logging.FileHandler.pattern      = %p/log/system.log
+java.util.logging.FileHandler.pattern      = %p/log/sis.log
 java.util.logging.FileHandler.formatter    = org.apache.sis.util.logging.MonolineFormatter
 java.util.logging.ConsoleHandler.formatter = org.apache.sis.util.logging.MonolineFormatter
 org.apache.sis.util.logging.MonolineFormatter.source = logger:long
-org.apache.sis.util.logging.MonolineFormatter.colors = false
diff --git a/application/sis-javafx/src/main/artifact/data/README b/application/sis-javafx/src/main/artifact/data/README
deleted file mode 120000
index 3c37ba67a0..0000000000
--- a/application/sis-javafx/src/main/artifact/data/README
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../sis-console/src/main/artifact/data/README
\ No newline at end of file
diff --git a/application/sis-javafx/src/main/artifact/data/README b/application/sis-javafx/src/main/artifact/data/README
new file mode 100644
index 0000000000..f318762ab8
--- /dev/null
+++ b/application/sis-javafx/src/main/artifact/data/README
@@ -0,0 +1,10 @@
+This directory is the default location of Apache SIS data.
+If desired, an alternative location can be defined with the
+SIS_DATA environment variable. Example:
+
+    export SIS_DATA=/my/data/directory
+
+The following sub-directories will be created when first needed:
+
+  - Databases
+  - DatumChanges
diff --git a/application/sis-javafx/src/main/artifact/log/README b/application/sis-javafx/src/main/artifact/log/README
index 1a20bbf5fc..a1966eb900 100644
--- a/application/sis-javafx/src/main/artifact/log/README
+++ b/application/sis-javafx/src/main/artifact/log/README
@@ -1,3 +1,3 @@
 This directory contains log messages produced by the system
 (Java + SIS + other applications), and a separated file for
-logs from Derby database.
+logs from Derby database driver.
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/internal/setup/LoggingConfiguration.java b/application/sis-javafx/src/main/java/org/apache/sis/internal/setup/LoggingConfiguration.java
deleted file mode 100644
index 6cf9b0d8f7..0000000000
--- a/application/sis-javafx/src/main/java/org/apache/sis/internal/setup/LoggingConfiguration.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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.setup;
-
-import java.util.logging.LogManager;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.File;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-import static org.apache.sis.internal.storage.io.IOUtilities.CURRENT_DIRECTORY_SYMBOL;
-
-
-/**
- * Loads {@code conf/logging.properties} file and filter the {@code %p} pattern
- * before to delegate to Java logging system. The filtering replaces {@code "%p"}
- * by the parent directory of configuration file.
- *
- * <p>This class should not use any SIS classes (except constants inlined at compile-time)
- * because it may be invoked early while the application is still initializing.</p>
- *
- * <p>This class is not referenced directly by other Java code.
- * Instead, it is specified at JVM startup time like below:</p>
- *
- * {@preformat shell
- *     java -Djava.util.logging.config.class="org.apache.sis.internal.setup.LoggingConfiguration"
- * }
- *
- * @author  Martin Desruisseaux (Geomatys)
- * @version 1.1
- * @since   1.1
- * @module
- */
-public final class LoggingConfiguration {
-    /**
-     * The property to filter.
-     */
-    private static final String PROPERTY = "java.util.logging.FileHandler.pattern";
-
-    /**
-     * The pattern to replace.
-     */
-    private static final String PATTERN = "%p";
-
-    /**
-     * Invoked by Java if the {@code java.util.logging.config.class} property is set
-     * to this class name. This constructor filters {@code conf/logging.properties},
-     * then delegate to Java logging system.
-     *
-     * @throws IOException if an error occurred while reading the configuration file.
-     */
-    public LoggingConfiguration() throws IOException {
-        final String file = System.getProperty("java.util.logging.config.file");
-        if (file != null) {
-            final Path path = Paths.get(file).normalize();
-            final StringBuilder buffer = new StringBuilder(600);
-            for (String line : Files.readAllLines(path)) {
-                if (!(line = line.trim()).isEmpty() && line.charAt(0) != '#') {
-                    final int base = buffer.length();
-                    buffer.append(line).append('\n');
-                    if (line.startsWith(PROPERTY)) {
-                        final int i = buffer.indexOf(PATTERN, base + PROPERTY.length());
-                        if (i >= 0) {
-                            Path parent = path;
-                            for (int j=Math.min(parent.getNameCount(), 2); --j >= 0;) {
-                                parent = parent.getParent();
-                            }
-                            String replacement = (parent != null) ? parent.toString() : CURRENT_DIRECTORY_SYMBOL;
-                            replacement = replacement.replace(File.separatorChar, '/');
-                            buffer.replace(i, i + PATTERN.length(), replacement);
-                        }
-                    }
-                }
-            }
-            LogManager.getLogManager().readConfiguration​(new ByteArrayInputStream(buffer.toString().getBytes()));
-        }
-    }
-}
diff --git a/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java b/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java
index bf5bb1e582..540b7c5cba 100644
--- a/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java
+++ b/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java
@@ -48,12 +48,12 @@ import static org.apache.sis.internal.maven.Filenames.*;
  * The created file contains:
  *
  * <ul>
- *   <li>the content of the <code>application/sis-console/src/main/artifact</code> directory;</li>
+ *   <li>the content of the <code>application/sis-javafx/src/main/artifact</code> directory;</li>
  *   <li>the JAR files of all modules and their dependencies, without their native resources;</li>
  *   <li>the native resources in a separated {@code lib/} directory.</li>
  * </ul>
  *
- * This MOJO can be invoked from the command line in the {@code sis-console} module as below:
+ * This MOJO can be invoked from the command line in the {@code sis-javafx} module as below:
  *
  * <blockquote><code>mvn package org.apache.sis.core:sis-build-helper:dist</code></blockquote>
  *
@@ -113,7 +113,7 @@ public final class Assembler extends AbstractMojo implements FilenameFilter {
             zip.setLevel(9);
             appendRecursively(sourceDirectory, artifactBase, zip);
             /*
-             * At this point, all the "application/sis-console/src/main/artifact" and sub-directories
+             * At this point, all the "application/sis-javafx/src/main/artifact" and sub-directories
              * have been zipped. Now append the JAR files for each module and their dependencies.
              */
             final Map<String,byte[]> nativeFiles = new LinkedHashMap<>();
@@ -163,7 +163,7 @@ public final class Assembler extends AbstractMojo implements FilenameFilter {
     /**
      * Adds the given file in the ZIP file. If the given file is a directory, then this method
      * recursively adds all files contained in this directory. This method is invoked for zipping
-     * the "application/sis-console/src/main/artifact" directory and sub-directories before to zip.
+     * the "application/sis-javafx/src/main/artifact" directory and sub-directories before to zip.
      */
     private void appendRecursively(final File file, String relativeFile, final ZipArchiveOutputStream out) throws IOException {
         if (file.isDirectory()) {
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/system/package-info.java b/core/sis-utility/src/main/java/org/apache/sis/internal/system/package-info.java
index 489c4acb89..88db831943 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/system/package-info.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/system/package-info.java
@@ -24,7 +24,7 @@
  * may change in incompatible ways in any future version without notice.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.2
+ * @version 1.3
  * @since   0.3
  * @module
  */
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/logging/Initializer.java b/core/sis-utility/src/main/java/org/apache/sis/util/logging/Initializer.java
new file mode 100644
index 0000000000..1ad9d44dca
--- /dev/null
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/logging/Initializer.java
@@ -0,0 +1,133 @@
+/*
+ * 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.util.logging;
+
+import java.util.logging.LogManager;
+import java.util.logging.FileHandler;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.File;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+
+/**
+ * Loads a logging configuration file using Java logging syntax augmented with Apache SIS extensions.
+ * The {@code "java.util.logging.config.file"} {@linkplain System#getProperty(String) system property}
+ * must be set to the path of a {@linkplain java.util.Properties properties} file containing configuration
+ * in the format described by {@link LogManager}.
+ * This class applies the following filtering on the configuration file:
+ *
+ * <ul>
+ *   <li>Changes in {@code "java.util.logging.FileHandler.pattern"} property value:
+ *     <ul>
+ *       <li>Replace {@code %p} by the parent directory of the logging configuration file.</li>
+ *     </ul>
+ *   </li>
+ * </ul>
+ *
+ * <h2>Example</h2>
+ * Given an application with the following directory structure:
+ *
+ * <pre>application
+ * ├─ conf/
+ * │  └─ logging.properties
+ * └─ log/</pre>
+ *
+ * If the {@code logging.properties} contains the following line:
+ *
+ * <pre>java.util.logging.FileHandler.pattern = <b>%p</b>/log/myapp.log</pre>
+ *
+ * Then the {@code %p} characters of that property value will be replaced by the path to the
+ * {@code application} directory, thus allowing the application to log in the {@code log/} sub-directory.
+ * Other special components such as {@code %t}, {@code %h}, {@code %g} or {@code %u} are handled as usual
+ * (i.e. as documented by {@link FileHandler}).
+ *
+ * <h2>Usage</h2>
+ * This class should not referenced directly by other Java code.
+ * Instead, it should be specified at JVM startup time like below:
+ *
+ * <pre>java -Djava.util.logging.config.class=org.apache.sis.util.logging.Initializer \
+ *     -Djava.util.logging.config.file=<i>path/to/my/application/conf/logging.properties</i></pre>
+ *
+ * See for example the {@code bin/sis} shell script in Apache SIS binary distribution.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @version 1.3
+ *
+ * @see FileHandler
+ *
+ * @since 1.3
+ * @module
+ */
+public class Initializer {
+    /*
+     * WARNING: This class shall not use any SIS classes (except constants inlined at compile-time)
+     *          because it may be invoked early while the application is still initializing.
+     */
+
+    /**
+     * The property for which to replace the {@value #PATTERN} string.
+     */
+    private static final String PROPERTY = "java.util.logging.FileHandler.pattern";
+
+    /**
+     * The pattern to replace.
+     */
+    private static final String PATTERN = "%p";
+
+    /**
+     * Configures Java logging using a filtered configuration file.
+     * This constructor gets the configuration file referenced by
+     * the {@code "java.util.logging.config.file"} system property,
+     * applies the filtering described in class javadoc,
+     * then gives the filtered configuration to {@link LogManager#readConfiguration​(InputStream)}.
+     *
+     * <p>This constructor should not be invoked directly.
+     * See class javadoc for usage example.</p>
+     *
+     * @throws IOException if an error occurred while reading the configuration file.
+     */
+    public Initializer() throws IOException {
+        final String file = System.getProperty("java.util.logging.config.file");
+        if (file != null) {
+            final Path path = Paths.get(file).normalize();
+            final StringBuilder buffer = new StringBuilder(600);
+            for (String line : Files.readAllLines(path)) {
+                if (!(line = line.trim()).isEmpty() && line.charAt(0) != '#') {
+                    final int base = buffer.length();
+                    buffer.append(line).append('\n');
+                    if (line.startsWith(PROPERTY)) {
+                        final int i = buffer.indexOf(PATTERN, base + PROPERTY.length());
+                        if (i >= 0) {
+                            Path parent = path;
+                            for (int j=Math.min(parent.getNameCount(), 2); --j >= 0;) {
+                                parent = parent.getParent();
+                            }
+                            String replacement = (parent != null) ? parent.toString() : ".";
+                            replacement = replacement.replace(File.separatorChar, '/');
+                            buffer.replace(i, i + PATTERN.length(), replacement);
+                        }
+                    }
+                }
+            }
+            LogManager.getLogManager().readConfiguration​(new ByteArrayInputStream(buffer.toString().getBytes()));
+        }
+    }
+}