com.isti.util
Class LogFile

java.lang.Object
  extended bycom.isti.util.LogFile

public class LogFile
extends java.lang.Object

Class LogFile provides log file output services. The 'initLogObj()' and 'getLogObj()' functions support the use of a single "global" log file object. Other "local" log file objects may also be created and used. Each log message is received with one of the the following message levels: ERROR - An error which causes the program to abort. WARNING - An unexpected condition, but the program continues. INFO - An informational message. DEBUG - A debug message, for developers only. DEBUG2-5 - Debug messages of increasing detail, for developers only. The console and log file outputs are configurable such that only messages at or beyond a set message level are retained. The message level is shown on each output message, and the date & time are shown on each message sent to the log file. Options are available for adding a date code to the filename and creating new log files as the date code changes, as well as automatic deletion of old log files.


Field Summary
static int ALL_MSGS
          A message level value used to specify that all messages will be retained (-999).
static java.lang.String ALL_MSGS_STR
          String version of a message level value used to specify that all messages will be retained.
static int DEBUG
          A message level value that denotes a debug message, for developers only (0).
static java.lang.String DEBUG_STR
          String version of a message level value that denotes a debug message, for developers only.
static int DEBUG2
          A message level value that denotes a lower-level debug (2) message, for developers only (-1).
static java.lang.String DEBUG2_STR
          String version of a message level value that denotes a debug (2) message, for developers only.
static int DEBUG3
          A message level value that denotes a lower-level debug (3) message, for developers only (-2).
static java.lang.String DEBUG3_STR
          String version of a message level value that denotes a debug (3) message, for developers only.
static int DEBUG4
          A message level value that denotes a lower-level debug (4) message, for developers only (-3).
static java.lang.String DEBUG4_STR
          String version of a message level value that denotes a debug (4) message, for developers only.
static int DEBUG5
          A message level value that denotes a lower-level debug (5) message, for developers only (-4).
static java.lang.String DEBUG5_STR
          String version of a message level value that denotes a debug (5) message, for developers only.
static boolean DEFAULT_GMT_FLAG
          Default for 'gmtFlag'.
static boolean DEFAULT_USE_DATE_IN_FNAME_FLAG
          Default for 'useDateInFnameFlag'.
static int ERROR
          A message level value that denotes an error which causes the program to abort (3).
static java.lang.String ERROR_STR
          String version of a message level value that denotes an error which causes the program to abort.
static java.lang.String FILE_DATE_PATTERNSTR
          Pattern string for "file" date formatter ("yyyyMMdd").
static java.lang.String FNAME_DATE_SEPSTR
          Separator used between file name and date code ("_").
static int INFO
          A message level value that denotes an informational message (1).
static java.lang.String INFO_STR
          String version of a message level value that denotes an informational message.
static java.lang.String LONG_DATE_PATTERNSTR
          Pattern string for "long" date formatter ("MMMM dd, yyyy HH:mm:ss z").
static int NO_LEVEL
          A message level value used to specify that no log-level indicator is to be output with the message (998).
static int NO_MSGS
          A message level value used to specify that no messages will be retained (999).
static java.lang.String NO_MSGS_STR
          String version of a message level value used to specify that no messages will be retained.
static java.lang.String SHORT_DATE_PATTERNSTR
          Pattern string for "short" date formatter ("MMM dd yyyy HH:mm:ss").
static int WARNING
          A message level value that denotes an unexpected condition, but the program continues (2).
static java.lang.String WARNING_STR
          String version of a message level value that denotes an unexpected condition, but the program continues.
 
Constructor Summary
LogFile(java.lang.String fName, int logFileLevel, int consoleLevel)
          Creates a new LogFile object, using the local timezone for timestamps.
LogFile(java.lang.String fName, int logFileLevel, int consoleLevel, boolean gmtFlag)
          Creates a new LogFile object.
LogFile(java.lang.String fName, int logFileLevel, int consoleLevel, boolean gmtFlag, boolean useDateInFnameFlag)
          Creates a new LogFile object.
 
Method Summary
 void addTrackedMsgListener(DataChangedListener listenerObj)
          Adds the given tracked-message listener.
 void close()
          Closes the log file.
 boolean debug(java.lang.String str)
          Sends the given string to the log file with the message level set to 'DEBUG'.
 boolean debug2(java.lang.String str)
          Sends the given string to the log file with the message level set to 'DEBUG2'.
 boolean debug3(java.lang.String str)
          Sends the given string to the log file with the message level set to 'DEBUG3'.
 boolean debug4(java.lang.String str)
          Sends the given string to the log file with the message level set to 'DEBUG4'.
 boolean debug5(java.lang.String str)
          Sends the given string to the log file with the message level set to 'DEBUG5'.
 boolean error(java.lang.String str)
          Sends the given string to the log file with the message level set to 'ERROR'.
 int getConsoleLevel()
          Gets the current level for console output messages.
static LogFile getConsoleLogObj()
          Gets a handle to the console log file object.
 java.text.DateFormat getDateFormat()
          Gets the date formatter for log file entries.
 java.lang.String getFileName()
          Returns the current log file name in use.
static LogFile getGlobalLogObj()
          Gets a handle to the "global" log file object.
static LogFile getGlobalLogObj(boolean consoleFlag)
          Gets a handle to the "global" log file object.
static java.lang.String[] getLevelNamesArray()
          Returns an array containing all the valid log-level name strings.
static java.lang.String getLevelNamesDisplayStr()
          Returns an array containing all the valid log-level name strings.
static java.util.Vector getLevelNamesVector()
          Returns a Vector containing all the valid log-level name strings.
static java.lang.String getLevelString(int level)
          Returns a String corresponding to the given message level value.
static java.lang.String getLevelStringNull(int level)
          Returns a String corresponding to the given message level value.
 int getLogFileLevel()
          Gets the current level for log file output messages.
 LogOutputStream getLogOutputStream()
          Returns an 'OutputStream' object whose output is directed to this log file.
 int getMaxLogFileAge()
          Gets the maximum log file age.
static LogFile getNullLogObj()
          Gets a handle to the null log file object.
 java.lang.String[] getTrackedMessages()
          Returns an array of strings containing the tracked messages.
 java.lang.String[] getTrackedMessages(int maxAgeMs)
          Returns an array of strings containing the tracked messages.
 java.lang.String getTrackedMsgsAsString(java.lang.String sepStr)
          Returns a string containing the tracked messages.
 java.lang.String getTrackedMsgsAsString(java.lang.String sepStr, int maxAgeMs)
          Returns a string containing the tracked messages.
 boolean info(java.lang.String str)
          Sends the given string to the log file with the message level set to 'INFO'.
static LogFile initGlobalLogObj(LogFile logObj)
          Initializes the "global" log file object.
static LogFile initGlobalLogObj(java.lang.String fName, int logFileLevel, int consoleLevel)
          Initializes the "global" log file object, using the local timezone for timestamps.
static LogFile initGlobalLogObj(java.lang.String fName, int logFileLevel, int consoleLevel, boolean gmtFlag)
          Initializes the "global" log file object.
static LogFile initGlobalLogObj(java.lang.String fName, int logFileLevel, int consoleLevel, boolean gmtFlag, boolean useDateInFnameFlag)
          Initializes the "global" log file object.
 boolean isOpen()
          Determines if the log file is open.
static java.lang.Integer levelStringToValue(java.lang.String str)
          Gets the integer value that corresponds to the given message level String.
 boolean println(int level, java.lang.String str)
          Sends the given string to the log file.
 boolean println(java.lang.String str)
          Sends the given string to the log file.
 void removeTrackedMsgListener(DataChangedListener listenerObj)
          Removes the given tracked-message listener.
 void setConsoleLevel(int level)
          Sets the current level for console output messages.
 void setLogFileLevel(int level)
          Sets the current level for console output messages.
 void setLogFileSwitchIntervalDays(int numDays)
          Sets the minimum number of days between log file switches via date changes.
 void setMaxLogFileAge(int maxAge)
          Sets the maximum log file age, in days.
 void setupMessageTracking(int msgLevel, int msgCount)
          Sets up message tracking.
 boolean warning(java.lang.String str)
          Sends the given string to the log file with the message level set to 'WARNING'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR

public static final int ERROR
A message level value that denotes an error which causes the program to abort (3).

See Also:
Constant Field Values

WARNING

public static final int WARNING
A message level value that denotes an unexpected condition, but the program continues (2).

See Also:
Constant Field Values

INFO

public static final int INFO
A message level value that denotes an informational message (1).

See Also:
Constant Field Values

DEBUG

public static final int DEBUG
A message level value that denotes a debug message, for developers only (0).

See Also:
Constant Field Values

DEBUG2

public static final int DEBUG2
A message level value that denotes a lower-level debug (2) message, for developers only (-1).

See Also:
Constant Field Values

DEBUG3

public static final int DEBUG3
A message level value that denotes a lower-level debug (3) message, for developers only (-2).

See Also:
Constant Field Values

DEBUG4

public static final int DEBUG4
A message level value that denotes a lower-level debug (4) message, for developers only (-3).

See Also:
Constant Field Values

DEBUG5

public static final int DEBUG5
A message level value that denotes a lower-level debug (5) message, for developers only (-4).

See Also:
Constant Field Values

ALL_MSGS

public static final int ALL_MSGS
A message level value used to specify that all messages will be retained (-999).

See Also:
Constant Field Values

NO_MSGS

public static final int NO_MSGS
A message level value used to specify that no messages will be retained (999).

See Also:
Constant Field Values

NO_LEVEL

public static final int NO_LEVEL
A message level value used to specify that no log-level indicator is to be output with the message (998). May be used with the 'println(level,msg)' method.

See Also:
Constant Field Values

ERROR_STR

public static final java.lang.String ERROR_STR
String version of a message level value that denotes an error which causes the program to abort.

See Also:
Constant Field Values

WARNING_STR

public static final java.lang.String WARNING_STR
String version of a message level value that denotes an unexpected condition, but the program continues.

See Also:
Constant Field Values

INFO_STR

public static final java.lang.String INFO_STR
String version of a message level value that denotes an informational message.

See Also:
Constant Field Values

DEBUG_STR

public static final java.lang.String DEBUG_STR
String version of a message level value that denotes a debug message, for developers only.

See Also:
Constant Field Values

DEBUG2_STR

public static final java.lang.String DEBUG2_STR
String version of a message level value that denotes a debug (2) message, for developers only.

See Also:
Constant Field Values

DEBUG3_STR

public static final java.lang.String DEBUG3_STR
String version of a message level value that denotes a debug (3) message, for developers only.

See Also:
Constant Field Values

DEBUG4_STR

public static final java.lang.String DEBUG4_STR
String version of a message level value that denotes a debug (4) message, for developers only.

See Also:
Constant Field Values

DEBUG5_STR

public static final java.lang.String DEBUG5_STR
String version of a message level value that denotes a debug (5) message, for developers only.

See Also:
Constant Field Values

ALL_MSGS_STR

public static final java.lang.String ALL_MSGS_STR
String version of a message level value used to specify that all messages will be retained.

See Also:
Constant Field Values

NO_MSGS_STR

public static final java.lang.String NO_MSGS_STR
String version of a message level value used to specify that no messages will be retained.

See Also:
Constant Field Values

DEFAULT_GMT_FLAG

public static final boolean DEFAULT_GMT_FLAG
Default for 'gmtFlag'.

See Also:
Constant Field Values

DEFAULT_USE_DATE_IN_FNAME_FLAG

public static final boolean DEFAULT_USE_DATE_IN_FNAME_FLAG
Default for 'useDateInFnameFlag'.

See Also:
Constant Field Values

FNAME_DATE_SEPSTR

public static final java.lang.String FNAME_DATE_SEPSTR
Separator used between file name and date code ("_").

See Also:
Constant Field Values

FILE_DATE_PATTERNSTR

public static final java.lang.String FILE_DATE_PATTERNSTR
Pattern string for "file" date formatter ("yyyyMMdd").

See Also:
Constant Field Values

SHORT_DATE_PATTERNSTR

public static final java.lang.String SHORT_DATE_PATTERNSTR
Pattern string for "short" date formatter ("MMM dd yyyy HH:mm:ss").

See Also:
Constant Field Values

LONG_DATE_PATTERNSTR

public static final java.lang.String LONG_DATE_PATTERNSTR
Pattern string for "long" date formatter ("MMMM dd, yyyy HH:mm:ss z").

See Also:
Constant Field Values
Constructor Detail

LogFile

public LogFile(java.lang.String fName,
               int logFileLevel,
               int consoleLevel,
               boolean gmtFlag,
               boolean useDateInFnameFlag)
Creates a new LogFile object.

Parameters:
fName - log file name to use (if a path name then any needed parent directories will be created), or null for none.
logFileLevel - minimum level of messages to send to the log file, such as NO_MSGS, INFO, etc.
consoleLevel - minimum level of messages to send to the console, such as NO_MSGS, INFO, etc.
gmtFlag - true to use GMT for timestamps, false to use the local timezone.
useDateInFnameFlag - true to use the date in the file name (and create a new log file everytime the date changes).

LogFile

public LogFile(java.lang.String fName,
               int logFileLevel,
               int consoleLevel,
               boolean gmtFlag)
Creates a new LogFile object.

Parameters:
fName - log file name to use (if a path name then any needed parent directories will be created).
logFileLevel - minimum level of messages to send to the log file, such as NO_MSGS, INFO, etc.
consoleLevel - minimum level of messages to send to the console, such as NO_MSGS, INFO, etc.
gmtFlag - true to use GMT for timestamps, false to use the local timezone.

LogFile

public LogFile(java.lang.String fName,
               int logFileLevel,
               int consoleLevel)
Creates a new LogFile object, using the local timezone for timestamps.

Parameters:
fName - log file name to use (if a path name then any needed parent directories will be created).
logFileLevel - minimum level of messages to send to the log file, such as NO_MSGS, INFO, etc.
consoleLevel - minimum level of messages to send to the console, such as NO_MSGS, INFO, etc.
Method Detail

getMaxLogFileAge

public int getMaxLogFileAge()
Gets the maximum log file age.

Returns:
the maximum age (in days) or 0 if disabled.

setMaxLogFileAge

public void setMaxLogFileAge(int maxAge)
Sets the maximum log file age, in days. If 'useDateInFnameFlag' is enabled then anytime a new log file name is put into use, any matching log files older than the given number of days are deleted. If 'useDateInFnameFlag' is not enabled then old log files will not be deleted. Note also that when this method is called, any matching log files older than the given age are deleted immediatedly (if 'useDateInFnameFlag' is enabled.)

Parameters:
maxAge - maximum age (in days) or 0 to disable.

setLogFileSwitchIntervalDays

public void setLogFileSwitchIntervalDays(int numDays)
Sets the minimum number of days between log file switches via date changes. This setting only has an effect if the log file was constructed with the 'useDateInFnameFlag' parameter set to 'true'. The default value is 1 day.

Parameters:
numDays - if > 0 then the minimum number of days between log file switches; otherwise the log file switching feature is disabled.

setupMessageTracking

public void setupMessageTracking(int msgLevel,
                                 int msgCount)
Sets up message tracking. The 'getTrackedMessages()' method will return the last 'msgCount' number of messages with a message level of 'msgLevel' or greater.

Parameters:
msgLevel - minimum message level to be tracked, or NO_MSGS for none.
msgCount - number of messages to be tracked.

getTrackedMessages

public java.lang.String[] getTrackedMessages(int maxAgeMs)
Returns an array of strings containing the tracked messages. See the 'setupMessageTracking()' method for details.

Parameters:
maxAgeMs - maximum age (in milliseconds) of messages returned, or 0 for all messages.
Returns:
An array of strings containing the tracked messages, or null if message tracking is not set up.

getTrackedMessages

public java.lang.String[] getTrackedMessages()
Returns an array of strings containing the tracked messages. See the 'setupMessageTracking()' method for details.

Returns:
An array of strings containing the tracked messages, or null if message tracking is not set up.

getTrackedMsgsAsString

public java.lang.String getTrackedMsgsAsString(java.lang.String sepStr,
                                               int maxAgeMs)
Returns a string containing the tracked messages. See the 'setupMessageTracking()' method for details.

Parameters:
sepStr - separator to be placed between each item.
maxAgeMs - maximum age (in milliseconds) of messages returned, or 0 for all messages.
Returns:
A string containing the tracked messages, or null if message tracking is not set up.

getTrackedMsgsAsString

public java.lang.String getTrackedMsgsAsString(java.lang.String sepStr)
Returns a string containing the tracked messages. See the 'setupMessageTracking()' method for details.

Parameters:
sepStr - separator to be placed between each item.
Returns:
A string containing the tracked messages, or null if message tracking is not set up.

addTrackedMsgListener

public void addTrackedMsgListener(DataChangedListener listenerObj)
Adds the given tracked-message listener. The listener's 'dataChanged()' method is called whenever a new log message is tracked.

Parameters:
listenerObj - the 'DataChangedListener' object to be added.

removeTrackedMsgListener

public void removeTrackedMsgListener(DataChangedListener listenerObj)
Removes the given tracked-message listener.

Parameters:
listenerObj - the 'DataChangedListener' object to be removed.

println

public boolean println(int level,
                       java.lang.String str)
Sends the given string to the log file. (And possibly the console--see the 'consoleLevel' parameter on the constructor.)

Parameters:
level - the message level to be used, or NO_LEVEL for none.
str - the string to be outputted.
Returns:
true if successful, false if an I/O error was detected.

println

public boolean println(java.lang.String str)
Sends the given string to the log file. (And possibly the console--see the 'consoleLevel' parameter on the constructor.) A log-level indicator is not included in the output.

Parameters:
str - the string to be outputted.
Returns:
true if successful, false if an I/O error was detected.

error

public boolean error(java.lang.String str)
Sends the given string to the log file with the message level set to 'ERROR'.

Parameters:
str - the string to be outputted.
Returns:
true if successful, false if an I/O error was detected.

warning

public boolean warning(java.lang.String str)
Sends the given string to the log file with the message level set to 'WARNING'.

Parameters:
str - the string to be outputted.
Returns:
true if successful, false if an I/O error was detected.

info

public boolean info(java.lang.String str)
Sends the given string to the log file with the message level set to 'INFO'.

Parameters:
str - the string to be outputted.
Returns:
true if successful, false if an I/O error was detected.

debug

public boolean debug(java.lang.String str)
Sends the given string to the log file with the message level set to 'DEBUG'.

Parameters:
str - the string to be outputted.
Returns:
true if successful, false if an I/O error was detected.

debug2

public boolean debug2(java.lang.String str)
Sends the given string to the log file with the message level set to 'DEBUG2'.

Parameters:
str - the string to be outputted.
Returns:
true if successful, false if an I/O error was detected.

debug3

public boolean debug3(java.lang.String str)
Sends the given string to the log file with the message level set to 'DEBUG3'.

Parameters:
str - the string to be outputted.
Returns:
true if successful, false if an I/O error was detected.

debug4

public boolean debug4(java.lang.String str)
Sends the given string to the log file with the message level set to 'DEBUG4'.

Parameters:
str - the string to be outputted.
Returns:
true if successful, false if an I/O error was detected.

debug5

public boolean debug5(java.lang.String str)
Sends the given string to the log file with the message level set to 'DEBUG5'.

Parameters:
str - the string to be outputted.
Returns:
true if successful, false if an I/O error was detected.

close

public void close()
Closes the log file.


getLogOutputStream

public LogOutputStream getLogOutputStream()
Returns an 'OutputStream' object whose output is directed to this log file.

Returns:
A new 'LogOutputStream' object associated with this log file.

getFileName

public java.lang.String getFileName()
Returns the current log file name in use.

Returns:
The log file name, or null if an error occurred.

isOpen

public boolean isOpen()
Determines if the log file is open.

Returns:
true if the log file is open.

getConsoleLevel

public int getConsoleLevel()
Gets the current level for console output messages. (See the 'consoleLevel' parameter on the constructor.)

Returns:
the current level for console output messages

setConsoleLevel

public void setConsoleLevel(int level)
Sets the current level for console output messages. (See the 'consoleLevel' parameter on the constructor.)

Parameters:
level - the console level to be used.

getLogFileLevel

public int getLogFileLevel()
Gets the current level for log file output messages. (See the 'logFileLevel' parameter on the constructor.)

Returns:
the current level for log file output messages

setLogFileLevel

public void setLogFileLevel(int level)
Sets the current level for console output messages. (See the 'logFileLevel' parameter on the constructor.)

Parameters:
level - the log file level to be used.

getLevelString

public static java.lang.String getLevelString(int level)
Returns a String corresponding to the given message level value.

Parameters:
level - the message level.
Returns:
a String corresponding to the given message level value, or "level#" if the value is not matched.

getLevelStringNull

public static java.lang.String getLevelStringNull(int level)
Returns a String corresponding to the given message level value.

Parameters:
level - the message level.
Returns:
a String corresponding to the given message level value, or null if the value is not matched.

levelStringToValue

public static java.lang.Integer levelStringToValue(java.lang.String str)
Gets the integer value that corresponds to the given message level String. A case-insensitive comparison is used.

Parameters:
str - the message level string to interpret.
Returns:
the integer value that corresponds to the given message level String or null if the String could not be matched.

getLevelNamesVector

public static java.util.Vector getLevelNamesVector()
Returns a Vector containing all the valid log-level name strings.

Returns:
A Vector of String objects.

getLevelNamesArray

public static java.lang.String[] getLevelNamesArray()
Returns an array containing all the valid log-level name strings.

Returns:
An array of String objects.

getLevelNamesDisplayStr

public static java.lang.String getLevelNamesDisplayStr()
Returns an array containing all the valid log-level name strings.

Returns:
An array of String objects.

initGlobalLogObj

public static LogFile initGlobalLogObj(LogFile logObj)
Initializes the "global" log file object. This function would be used by a program's "main" module to establish a "global" log file. Other modules can then get a handle to the "global" log file via the 'getGlobalLogObj()' function.

Parameters:
logObj - the log file object.
Returns:
A handle to the "global" log file object.

initGlobalLogObj

public static LogFile initGlobalLogObj(java.lang.String fName,
                                       int logFileLevel,
                                       int consoleLevel,
                                       boolean gmtFlag,
                                       boolean useDateInFnameFlag)
Initializes the "global" log file object. This function would be used by a program's "main" module to establish a "global" log file. Other modules can then get a handle to the "global" log file via the 'getGlobalLogObj()' function.

Parameters:
fName - log file name to use (if a path name then any needed parent directories will be created).
consoleLevel - minimum level of messages to send to the console, such as NO_MSGS, INFO, etc.
logFileLevel - minimum level of messages to send to the log file, such as NO_MSGS, INFO, etc.
gmtFlag - true to use GMT for timestamps, false to use the local timezone.
useDateInFnameFlag - true to use the date in the file name (and create a new log file everytime the date changes).
Returns:
A handle to the "global" log file object.

initGlobalLogObj

public static LogFile initGlobalLogObj(java.lang.String fName,
                                       int logFileLevel,
                                       int consoleLevel,
                                       boolean gmtFlag)
Initializes the "global" log file object. This function would be used by a program's "main" module to establish a "global" log file. Other modules can then get a handle to the "global" log file via the 'getGlobalLogObj()' function.

Parameters:
fName - log file name to use (if a path name then any needed parent directories will be created).
consoleLevel - minimum level of messages to send to the console, such as NO_MSGS, INFO, etc.
logFileLevel - minimum level of messages to send to the log file, such as NO_MSGS, INFO, etc.
gmtFlag - true to use GMT for timestamps, false to use the local timezone.
Returns:
A handle to the "global" log file object.

initGlobalLogObj

public static LogFile initGlobalLogObj(java.lang.String fName,
                                       int logFileLevel,
                                       int consoleLevel)
Initializes the "global" log file object, using the local timezone for timestamps. This function would be used by a program's "main" module to establish a "global" log file. Other modules can then get a handle to the "global" log file via the 'getGlobalLogObj()' function.

Parameters:
fName - log file name to use (if a path name then any needed parent directories will be created).
consoleLevel - minimum level of messages to send to the console, such as NO_MSGS, INFO, etc.
logFileLevel - minimum level of messages to send to the log file, such as NO_MSGS, INFO, etc.
Returns:
A handle to the "global" log file object.

getGlobalLogObj

public static LogFile getGlobalLogObj()
Gets a handle to the "global" log file object. A program's "main" module would establish a "global" log file via the 'initGlobalLogObj()' function. Other modules can then get a handle to the "global" log file via this function. If 'initGlobalLogObj()' was not called previously then a "global" log file named "default.log" will be created and used.

Returns:
A handle to the "global" log file object.

getGlobalLogObj

public static LogFile getGlobalLogObj(boolean consoleFlag)
Gets a handle to the "global" log file object. A program's "main" module would establish a "global" log file via the 'initGlobalLogObj()' function. Other modules can then get a handle to the "global" log file via this function. If 'initGlobalLogObj()' was not called previously then either a null log file that does nothing or a console log file is returned.

Parameters:
consoleFlag - true to return a console log file if 'initGlobalLogObj()' was not called previously, otherwise a null log file is returned. NOTE: Console output should be limited to messages that will be displayed infrequently.
Returns:
A handle to the "global" log file object.

getConsoleLogObj

public static LogFile getConsoleLogObj()
Gets a handle to the console log file object.

Returns:
A handle to the console log file object.

getNullLogObj

public static LogFile getNullLogObj()
Gets a handle to the null log file object.

Returns:
A handle to the null log file object.

getDateFormat

public java.text.DateFormat getDateFormat()
Gets the date formatter for log file entries.

Returns:
the date formatter for log file entries.