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/01/14 04:35:20 UTC
[sis] branch geoapi-4.0 updated (c6d42d4 -> ecee3c9)
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a change to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git.
from c6d42d4 Provide a way to select the filter log messages by logger.
new 4359328 Revert the removal `DURATION_FOR_LOGGING` threshold for logging and add an explanation about the rational. Tune the log levels of JavaFX application.
new ecee3c9 Build configuration: upgrade Maven dependencies.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../src/main/artifact/conf/logging.properties | 12 +++++++-----
.../factory/ConcurrentAuthorityFactory.java | 18 ++++++++++++++++--
pom.xml | 4 ++--
3 files changed, 25 insertions(+), 9 deletions(-)
[sis] 01/02: Revert the removal `DURATION_FOR_LOGGING` threshold for logging and add an explanation about the rational. Tune the log levels of JavaFX application.
Posted by de...@apache.org.
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 4359328b92f19e5466a78d48547134a2c6045a31
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Thu Jan 13 17:24:47 2022 +0100
Revert the removal `DURATION_FOR_LOGGING` threshold for logging and add an explanation about the rational.
Tune the log levels of JavaFX application.
---
.../src/main/artifact/conf/logging.properties | 12 +++++++-----
.../factory/ConcurrentAuthorityFactory.java | 18 ++++++++++++++++--
2 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/application/sis-javafx/src/main/artifact/conf/logging.properties b/application/sis-javafx/src/main/artifact/conf/logging.properties
index 159cab5..cd968f6 100644
--- a/application/sis-javafx/src/main/artifact/conf/logging.properties
+++ b/application/sis-javafx/src/main/artifact/conf/logging.properties
@@ -28,13 +28,15 @@ handlers = java.util.logging.FileHandler, \
# Filter the log records according their logging levels.
-# Filtering is applied:
+# Fine levels are used for allowing the application to
+# collect those records in the system monitor window:
#
-# - By package (CONFIG for SIS, INFO for everything else).
-# - By handler (WARNING for console, ALL for log file).
+# - By package (FINER for SIS, CONFIG for everything else).
+# - By handler (WARNING for console, FINE for log file).
-.level = INFO
-org.apache.sis.level = CONFIG
+.level = CONFIG
+org.apache.sis.level = FINER
+java.util.logging.FileHandler.level = FINE
java.util.logging.ConsoleHandler.level = WARNING
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
index 41c0c76..3d19915 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
@@ -106,6 +106,18 @@ public abstract class ConcurrentAuthorityFactory<DAO extends GeodeticAuthorityFa
extends GeodeticAuthorityFactory implements AutoCloseable
{
/**
+ * Duration of data access operations that should be logged, in nanoseconds.
+ * Any operation that take longer than this amount of time to execute will have a message logged.
+ * The log level depends on the execution duration as specified in {@link PerformanceLevel}.
+ *
+ * <div class="note"><b>Rational:</b>
+ * we do not unconditionally log all creation messages because they are redundant with more detailed
+ * logs produced by {@link GeodeticObjectFactory}. Their only additional information is the creation
+ * duration, which is not very useful if too close to zero.</div>
+ */
+ private static final long DURATION_FOR_LOGGING = 10_000_000L; // 10 milliseconds.
+
+ /**
* Sentinel value when {@link #authority} can not be determined because the data access object
* can not be constructed.
*/
@@ -469,9 +481,11 @@ public abstract class ConcurrentAuthorityFactory<DAO extends GeodeticAuthorityFa
/*
* Log the event. Note: there is no need to check for `Semaphores.FINER_OBJECT_CREATION_LOGS`
* because this method is not invoked, or is invoked with `type = null`, during execution of
- * `IdentifiedObjectFinder` seach operations.
+ * `IdentifiedObjectFinder` search operations. The only new information in this log compared
+ * to `GeodeticObjectFactory` logs is the creation duration, not useful if too close to zero
+ * and always useful if too long.
*/
- if (type != null) {
+ if (time >= DURATION_FOR_LOGGING && type != null) {
if (caller == null) {
caller = "create".concat(type.getSimpleName());
}
[sis] 02/02: Build configuration: upgrade Maven dependencies.
Posted by de...@apache.org.
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 ecee3c979931c37fea5f2dde3a0660a37c1b1b7a
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Thu Jan 13 18:01:40 2022 +0100
Build configuration: upgrade Maven dependencies.
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index c9a86ae..ea99c90 100644
--- a/pom.xml
+++ b/pom.xml
@@ -668,7 +668,7 @@
<!-- Compile -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.1</version>
+ <version>3.9.0</version>
<configuration>
<release>${maven.compiler.target}</release>
<encoding>${project.build.sourceEncoding}</encoding>
@@ -706,7 +706,7 @@
INDEX.LIST file is incomplete (which seem to happen in practice). -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
- <version>3.2.0</version>
+ <version>3.2.2</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>