NASA World Wind

gov.nasa.worldwind.util
Class Logging

java.lang.Object
  extended by gov.nasa.worldwind.util.Logging

public class Logging
extends Object

This class of static methods provides the interface to logging for World Wind components. Logging is performed via java.util.logging. The default logger name is gov.nasa.worldwind. The logger name is configurable via Configuration.

See Also:
Configuration, java.util.logging

Field Summary
protected static int MAX_MESSAGE_REPEAT
           
protected static String MESSAGE_BUNDLE_NAME
           
 
Method Summary
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 String getMessage(String property)
          Retrieves a message from the World Wind message resource bundle.
static String getMessage(String property, Object... args)
          Retrieves a message from the World Wind message resource bundle formatted with specified arguments.
static String getMessage(String property, String arg)
          Retrieves a message from the World Wind message resource bundle formatted with a single argument.
static Logger logger()
          Returns the World Wind logger.
static Logger logger(String loggerName)
          Returns a specific logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_MESSAGE_REPEAT

protected static final int MAX_MESSAGE_REPEAT

MESSAGE_BUNDLE_NAME

protected static final String MESSAGE_BUNDLE_NAME
Method Detail

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.

getMessage

public static String getMessage(String property)
Retrieves a message from the World Wind message resource bundle.

Parameters:
property - the property identifying which message to retrieve.
Returns:
The requested message.

getMessage

public static String getMessage(String property,
                                Object... args)
Retrieves a message from the World Wind message resource bundle formatted with specified arguments. The arguments are inserted into the message via MessageFormat.

Parameters:
property - the property identifying which message to retrieve.
args - the arguments referenced by the format string identified property.
Returns:
The requested string formatted with the arguments.
See Also:
MessageFormat

getMessage

public static String getMessage(String property,
                                String arg)
Retrieves a message from the World Wind message resource bundle formatted with a single argument. The argument is inserted into the message via MessageFormat.

Parameters:
property - the property identifying which message to retrieve.
arg - the single argument referenced by the format string identified property.
Returns:
The requested string formatted with the argument.
See Also:
MessageFormat

logger

public static Logger logger()
Returns the World Wind logger.

Returns:
The logger.

logger

public static Logger logger(String loggerName)
Returns a specific logger. Does not access Configuration to determine the configured World Wind 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.

NASA World Wind