jautil
Class JALog

java.lang.Object
  extended by jautil.JALog

public class JALog
extends java.lang.Object

This class provides JA classes with (very limited) access to the standard Java logging facilities.


Field Summary
static java.lang.String STD_LOG_FILE
          The standard file location for the JA log's file handler.
static java.lang.String STD_LOG_NAME
          The standard JA log name.
 
Constructor Summary
JALog()
           
 
Method Summary
static void createLog()
          Creates a logger using the standard name and file handler name.
static void createLog(java.lang.String name, java.lang.String file)
          Creates a logger with the given name and an attached file handler using the given file name.
static void disableLog()
          Disables the JA logger, which is initially disabled by default.
static void enableLog()
          Enables the JA logger, which is initially disabled by default.
 java.util.logging.Logger getLogger()
          Returns the logger, or null if none has yet been created.
static void info(java.lang.String msg)
          Logs the given INFO message to this process's logger.
static void infoAndThread(java.lang.String msg)
          Logs the given INFO message, plus the current thread's name and id to this process's logger.
static void infoAndThread(java.lang.String msg, java.lang.Thread t)
          Logs the given INFO message, plus the given thread's name and id to this process's logger.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STD_LOG_NAME

public static final java.lang.String STD_LOG_NAME
The standard JA log name.

See Also:
Constant Field Values

STD_LOG_FILE

public static final java.lang.String STD_LOG_FILE
The standard file location for the JA log's file handler. (The "%h" prefix identifies the user's home directory.)

See Also:
Constant Field Values
Constructor Detail

JALog

public JALog()
Method Detail

createLog

public static void createLog(java.lang.String name,
                             java.lang.String file)
Creates a logger with the given name and an attached file handler using the given file name.


createLog

public static void createLog()
Creates a logger using the standard name and file handler name.


getLogger

public java.util.logging.Logger getLogger()
Returns the logger, or null if none has yet been created.


enableLog

public static void enableLog()
Enables the JA logger, which is initially disabled by default.


disableLog

public static void disableLog()
Disables the JA logger, which is initially disabled by default.


info

public static void info(java.lang.String msg)
Logs the given INFO message to this process's logger.


infoAndThread

public static void infoAndThread(java.lang.String msg)
Logs the given INFO message, plus the current thread's name and id to this process's logger.


infoAndThread

public static void infoAndThread(java.lang.String msg,
                                 java.lang.Thread t)
Logs the given INFO message, plus the given thread's name and id to this process's logger.