Hi Dan:
Logging documentation is here, FWIW:
http://www.unidata.ucar.edu/software/netcdf-java/reference/JarDependencies.html
By default, you are using jdk1.4 logging. Im not sure how to control
that iin the context of maven / eclipse. Im taking the liberty of
forwarding this to the netcdf-java group in case someone there knows.
You might also want to consider using log4j.
The warning message comes from having time=0 (a 0 length unlimited
dimension). If you send me a sample file, ill see if I can safely make
the message go away.
-------- Original Message --------
Subject: New Ticket - [netCDFJava !AEU-822700]: Disabling netCDF
warning messages
Date: Wed, 31 Mar 2010 08:32:45 -0600
From: Dan Schaffer <support-netcdf-java@xxxxxxxxxxxxxxxx>
Reply-To: support-netcdf-java@xxxxxxxxxxxxxxxx
To: caron@xxxxxxxxxxxxxxxx
New Ticket: Disabling netCDF warning messages
Hello
I am getting WARNING messages such as the following when I make calls to
ucar.nc2.FileWriter.writeToFile
Mar 31, 2010 2:16:12 PM ucar.nc2.iosp.netcdf3.N3header makeRecordStructure
WARNING: N3header.makeRecordStructure cant slice variable int rh(time=0,
lat=3, lon=4);
:long_name = "relative humidity";
:units = "percent";
I'm not observing any incorrect results so it appears the warning is benign.
If it is benign, I'd like to know the cleanest way to shut these warnings off.
I develop in the maven/eclipse environment.
From the SLF documentation I reference I could see how to turn them off when I
run my tests from mvn by modifying
$JAVA_HOME/jre/lib/logging.properties. However, I'd prefer to accomplish this
in a more maintainable manner by modifying my mvn pom
file. I tried doing that by adding the following
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.11</version>
<scope>test</scope>
</dependency>
But then I got the following messages when I ran the test:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/home/schaffer/.m2/repository/org/slf4j/slf4j-log4j12/1.5.11/slf4j-log4j12-1.5.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/home/schaffer/.m2/repository/ucar/netcdfAll/4.0/netcdfAll-4.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
log4j:WARN No appenders could be found for logger (ucar.nc2.NetcdfFile).
log4j:WARN Please initialize the log4j system properly.
Thanks,
Dan Schaffer