org.geotoolkit.util.logging
Interface LogProducer

All Known Implementing Classes:
GridCoverageReader, GridCoverageStore, GridCoverageWriter, ImageCoverageReader, ImageCoverageWriter, LayerCoverageReader, MosaicBuilder, MosaicImageReader, MosaicImageWriter

public interface LogProducer

Interface for objects that produce logs of special interest. While every classes in the Geotk library may emit log records, a few of them can emit logs considered more useful than other logs for monitoring an application.

Example: The MosaicImageReader class can log the collection of tiles used for a particular read operations. By default, this information is logged at one of the PerformanceLevels, which are usually disabled (in order to avoid the cost of creating those log messages in production environment). If those logs are needed, the usual approach is to use the java.util.logging API or edit the $JAVA_HOME/lib/logging.properties file. This interface provides an alternative, allowing to raise the level to Level.INFO, which is quite convenient on occasions.

Since:
3.15
Version:
3.15
Author:
Martin Desruisseaux (Geomatys)
Module:
utility/geotk-utility (download)    View source code for this class

Method Summary
 Level getLogLevel()
          Returns the current logging level.
 void setLogLevel(Level level)
          Sets the logging level to the given value.
 

Method Detail

getLogLevel

Level getLogLevel()
Returns the current logging level. If the actual logging level can be any of the PerformanceLevel constants depending on the duration of the task being logged, then this method returns PerformanceLevel.PERFORMANCE.

Returns:
The current logging level.

setLogLevel

void setLogLevel(Level level)
Sets the logging level to the given value. A null value restore the default level. The default level is implementation-dependent, but many implementations will chose one of the PerformanceLevel constants depending on the duration of the task being logged.

Parameters:
level - The new logging level, or null for the default.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.