JXTA

net.jxta.logging
Class Logging

java.lang.Object
  extended by net.jxta.logging.Logging

public final class Logging
extends Object

This class defines constants for JXTA JSE's logging facilities. In this implementation the constants are initialized based upon the value of the Java System property net.jxta.logging.Logging. This implementation defines all of the public constants as final which enables the JVM/JIT to optimize out the logging code when appropriately configured.

Alternate implementations of this class could;

To control logging within applications :
 
 System.setProperty("net.jxta.logging.Logging", "FINEST");
 System.setProperty("net.jxta.level", "FINEST");
 System.setProperty("java.util.logging.config.file", "/home/userhome/logging.properties");
 
 

Sample logging properties :

 
 # default file output is in user's home directory.
 java.util.logging.FileHandler.pattern = %h/java%u.log
 java.util.logging.FileHandler.limit = 50000
 java.util.logging.FileHandler.count = 1
 java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
 
 # Limit the message that are printed on the console to INFO and above
 java.util.logging.ConsoleHandler.level = FINEST
 java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

 # Facility specific properties.
 # Provides extra control for each logger.
 #
 # For example, set the net.jxta.impi.pipe.PipeResolver logger to only log SEVERE
 # messages:
 net.jxta.impi.pipe.PipeResolver.level = FINEST
 
 


Field Summary
static String JXTA_LOGGING_PROPERTY
          The name of the system property from which we will attempt to read our logging configuration.
static Level MIN_SHOW_LEVEL
          The logging level for this run.
static boolean SHOW_CONFIG
          Is Level.CONFIG enabled?
static boolean SHOW_FINE
          Is Level.FINE enabled?
static boolean SHOW_FINER
          Is Level.FINER enabled?
static boolean SHOW_FINEST
          Is Level.FINEST enabled?
static boolean SHOW_INFO
          Is Level.INFO enabled?
static boolean SHOW_SEVERE
          Is Level.SEVERE enabled?
static boolean SHOW_WARNING
          Is Level.WARNING enabled?
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JXTA_LOGGING_PROPERTY

public static final String JXTA_LOGGING_PROPERTY
The name of the system property from which we will attempt to read our logging configuration.

See Also:
Constant Field Values

MIN_SHOW_LEVEL

public static final Level MIN_SHOW_LEVEL
The logging level for this run.


SHOW_FINEST

public static final boolean SHOW_FINEST
Is Level.FINEST enabled?


SHOW_FINER

public static final boolean SHOW_FINER
Is Level.FINER enabled?


SHOW_FINE

public static final boolean SHOW_FINE
Is Level.FINE enabled?


SHOW_CONFIG

public static final boolean SHOW_CONFIG
Is Level.CONFIG enabled?


SHOW_INFO

public static final boolean SHOW_INFO
Is Level.INFO enabled?


SHOW_WARNING

public static final boolean SHOW_WARNING
Is Level.WARNING enabled?


SHOW_SEVERE

public static final boolean SHOW_SEVERE
Is Level.SEVERE enabled?


JXSE