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
The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
new cd95da4 Reduce the logging level of UCAR messages from `WARNING` to
`FINE`.
cd95da4 is described below
commit cd95da4d28028d0686205a2671ce578a89cd86de
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Mon Mar 21 12:43:55 2022 +0100
Reduce the logging level of UCAR messages from `WARNING` to `FINE`.
---
.../org/apache/sis/internal/netcdf/ucar/LogAdapter.java | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git
a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/LogAdapter.java
b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/LogAdapter.java
index 3f9451b..5ddc6ee 100644
---
a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/LogAdapter.java
+++
b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/LogAdapter.java
@@ -16,6 +16,7 @@
*/
package org.apache.sis.internal.netcdf.ucar;
+import java.util.logging.Level;
import org.apache.sis.util.CharSequences;
import org.apache.sis.storage.event.StoreListeners;
@@ -27,7 +28,7 @@ import org.apache.sis.storage.event.StoreListeners;
* that a complete line has been received.
*
* @author Martin Desruisseaux (Geomatys)
- * @version 0.8
+ * @version 1.2
* @since 0.8
* @module
*/
@@ -71,10 +72,10 @@ final class LogAdapter implements Appendable {
for (int i=0; i<count; i++) {
final CharSequence line = sp[i];
if (buffer.length() != 0) {
- warning(buffer.append(line));
+ log(buffer.append(line));
buffer.setLength(0);
} else {
- warning(line);
+ log(line);
}
}
/*
@@ -105,7 +106,7 @@ final class LogAdapter implements Appendable {
if (c != '\r' && c != '\n') {
buffer.append(c);
} else if (buffer.length() != 0) {
- warning(buffer);
+ log(buffer);
buffer.setLength(0);
}
return this;
@@ -114,10 +115,10 @@ final class LogAdapter implements Appendable {
/**
* Sends the given message to the listeners if the message is non-white.
*/
- private void warning(CharSequence message) {
+ private void log(CharSequence message) {
message = CharSequences.trimWhitespaces(message);
if (message.length() != 0) {
- listeners.warning(message.toString());
+ listeners.warning(Level.FINE, message.toString(), null);
}
}
}