Package gov.nasa.worldwind.util
Class Logging
- java.lang.Object
-
- gov.nasa.worldwind.util.Logging
-
public class Logging extends java.lang.Object
This class of static methods provides the interface to logging for WorldWind components. Logging is performed viaLogger
. The default logger name isgov.nasa.worldwind
. The logger name is configurable viaConfiguration
.- See Also:
Configuration
,Logger
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
MAX_MESSAGE_REPEAT
protected static java.lang.String
MESSAGE_BUNDLE_NAME
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getMaxMessageRepeatCount()
Indicates the maximum number of times the same log message should be repeated when generated in the same context, such as within a loop over renderables when operations in the loop consistently fail.static java.lang.String
getMessage(java.lang.String property)
Retrieves a message from the WorldWind message resource bundle.static java.lang.String
getMessage(java.lang.String property, java.lang.Object... args)
Retrieves a message from the WorldWind message resource bundle formatted with specified arguments.static java.lang.String
getMessage(java.lang.String property, java.lang.String arg)
Retrieves a message from the WorldWind message resource bundle formatted with a single argument.static java.util.logging.Logger
logger()
Returns the WorldWind logger.static java.util.logging.Logger
logger(java.lang.String loggerName)
Returns a specific logger.
-
-
-
Method Detail
-
logger
public static java.util.logging.Logger logger()
Returns the WorldWind logger.- Returns:
- The logger.
-
logger
public static java.util.logging.Logger logger(java.lang.String loggerName)
Returns a specific logger. Does not accessConfiguration
to determine the configured WorldWind logger.This is needed by
Configuration
to avoid calls back into itself when its singleton instance is not yet instantiated.- Parameters:
loggerName
- the name of the logger to use.- Returns:
- The logger.
-
getMessage
public static java.lang.String getMessage(java.lang.String property)
Retrieves a message from the WorldWind message resource bundle.- Parameters:
property
- the property identifying which message to retrieve.- Returns:
- The requested message.
-
getMessage
public static java.lang.String getMessage(java.lang.String property, java.lang.String arg)
Retrieves a message from the WorldWind message resource bundle formatted with a single argument. The argument is inserted into the message viaMessageFormat
.- Parameters:
property
- the property identifying which message to retrieve.arg
- the single argument referenced by the format string identifiedproperty
.- Returns:
- The requested string formatted with the argument.
- See Also:
MessageFormat
-
getMessage
public static java.lang.String getMessage(java.lang.String property, java.lang.Object... args)
Retrieves a message from the WorldWind message resource bundle formatted with specified arguments. The arguments are inserted into the message viaMessageFormat
.- Parameters:
property
- the property identifying which message to retrieve.args
- the arguments referenced by the format string identifiedproperty
.- Returns:
- The requested string formatted with the arguments.
- See Also:
MessageFormat
-
getMaxMessageRepeatCount
public static int getMaxMessageRepeatCount()
Indicates the maximum number of times the same log message should be repeated when generated in the same context, such as within a loop over renderables when operations in the loop consistently fail.- Returns:
- the maximum number of times to repeat a message.
-
-