com.planet_ink.coffee_mud.core
Class Log

java.lang.Object
  extended by java.util.logging.Logger
      extended by com.planet_ink.coffee_mud.core.Log

public class Log
extends java.util.logging.Logger

One of the oldest classes in CoffeeMud -- ye olde logger. Features include date formatting, the standard set of log channels, plus optional numeric levels within those in case some kinds of info are more important than others. Also manages multiple log files if necessary, up to a limit defined by the appl. Rewritten on 05/07/2013


Nested Class Summary
static interface Log.LogReader
          A rolling log reader interface for streaming in a log a line at a time.
static class Log.Type
          The various log types supported by this logger.
 
Field Summary
 
Fields inherited from class java.util.logging.Logger
global, GLOBAL_LOGGER_NAME
 
Constructor Summary
Log()
          Constructor for a log object.
 
Method Summary
static boolean accessChannelAt(int priority)
          Returns whether access-log channel writer is allocated for current thread for given priority.
static boolean accessChannelOn()
          Returns whether access-log channel writer is allocated for current thread.
static void accessOut(java.lang.String message)
          Sends the given message to the access channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void accessOut(java.lang.String module, java.lang.String message)
          Sends the given message to the access channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void accessOut(java.lang.String module, java.lang.String message, int priority)
          Sends the given message to the access channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
 void addHandler(java.util.logging.Handler handler)
           
 void close()
          Shut down this class forever
static boolean combatChannelAt(int priority)
          Returns whether combat-log channel writer is allocated for current thread for given priority.
static boolean combatChannelOn()
          Returns whether combat-log channel writer is allocated for current thread.
static void combatOut(java.lang.String message)
          Sends the given message to the combatlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void combatOut(java.lang.String message, int priority)
          Sends the given message to the combatlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void combatOut(java.lang.String module, java.lang.String message)
          Sends the given message to the combat channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void combatOut(java.lang.String module, java.lang.String message, int priority)
          Sends the given message to the combatlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
 void config(java.lang.String msg)
           
 void configureLog(Log.Type type, java.lang.String code)
          Reset all of the log files ON, OFF, FILE, BOTH Usage: CMProps.initLog(Log.LogType.info,"ON");
 void configureLog(Log.Type type, java.lang.String code, int numberOfLogs)
          Reset all of the log files ON, OFF, FILE, BOTH Usage: CMProps.initLog(Log.LogType.info,"OWNFILE",20);
 void configureLogFile(java.lang.String logFilePath, int numberOfLogs)
          Start all of the log files in the info temp directory Usage: configureLogFile("mud",5);
static boolean debugChannelAt(int priority)
          Returns whether debug channel writer is allocated for current thread for given priority.
static boolean debugChannelOn()
          Returns whether debug channel writer is allocated for current thread.
static void debugOut(java.lang.String message)
          Sends the given message to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void debugOut(java.lang.String message, int priority)
          Sends the given message to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void debugOut(java.lang.String module, int priority, java.lang.Exception e)
          Sends the given exception to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void debugOut(java.lang.String module, java.lang.String message)
          Sends the given message to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void debugOut(java.lang.String module, java.lang.String message, int priority)
          Sends the given message to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void debugOut(java.lang.String module, java.lang.Throwable e)
          Sends the given exception to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void debugOut(java.lang.Throwable e)
          Sends the given exception to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
 void entering(java.lang.String sourceClass, java.lang.String sourceMethod)
           
 void entering(java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.Object param1)
           
 void entering(java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.Object[] params)
           
static boolean errorChannelAt(int priority)
          Returns whether error channel writer is allocated for current thread for given priority.
static boolean errorChannelOn()
          Returns whether error channel writer is allocated for current thread.
static void errOut(java.lang.String message)
          Sends the given message to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void errOut(java.lang.String message, int priority)
          Sends the given message to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void errOut(java.lang.String module, int priority, java.lang.Throwable e)
          Sends the given exception to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void errOut(java.lang.String module, java.lang.String message)
          Sends the given message to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void errOut(java.lang.String module, java.lang.String message, int priority)
          Sends the given message to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void errOut(java.lang.String module, java.lang.Throwable e)
          Sends the given exception to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void errOut(java.lang.Throwable e)
          Sends the given exception to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
 void exiting(java.lang.String sourceClass, java.lang.String sourceMethod)
           
 void exiting(java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.Object result)
           
 void fine(java.lang.String msg)
           
 void finer(java.lang.String msg)
           
 void finest(java.lang.String msg)
           
 java.util.logging.Filter getFilter()
           
 java.util.logging.Handler[] getHandlers()
           
 java.util.logging.Level getLevel()
           
 java.lang.StringBuffer getLog()
          Returns the contents of the log file as a StringBuffer, if it exists
 java.lang.String getLogFilename(Log.Type type)
          Given a log type, return the default log file name or null.
 java.lang.String getLogLocation()
          Start all of the log files Usage: path = getLogLocation();
 Log.LogReader getLogReader()
          Returns an internally managed log reader class to make reading lines from the log slightly easier
 java.lang.String getName()
           
 java.util.logging.Logger getParent()
           
 java.util.ResourceBundle getResourceBundle()
           
 java.lang.String getResourceBundleName()
           
 boolean getUseParentHandlers()
           
static boolean helpChannelAt(int priority)
          Returns whether help channel writer is allocated for current thread for given priority.
static boolean helpChannelOn()
          Returns whether help channel writer is allocated for current thread.
static void helpOut(java.lang.String message)
          Sends the given message to the help channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void helpOut(java.lang.String message, int priority)
          Sends the given message to the help channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void helpOut(java.lang.String module, java.lang.String message)
          Sends the given message to the help channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void helpOut(java.lang.String module, java.lang.String message, int priority)
          Sends the given message to the help channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
 void info(java.lang.String msg)
           
static boolean infoChannelAt(int priority)
          Returns whether info channel writer is allocated for current thread for given priority.
static boolean infoChannelOn()
          Returns whether info channel writer is allocated for current thread.
static void infoOut(java.lang.String message)
          Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void infoOut(java.lang.String message, int priority)
          Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void infoOut(java.lang.String module, java.lang.String message)
          Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void infoOut(java.lang.String module, java.lang.String message, int priority)
          Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static Log instance()
          Returns a Log object for the current thread group.
 boolean isLoggable(java.util.logging.Level level)
           
static boolean isMaskedErrMsg(java.lang.String str)
          Optional method to determine if message is a masked out throwable message type.
static boolean killsChannelAt(int priority)
          Returns whether kill-log channel writer is allocated for current thread for given priority.
static boolean killsChannelOn()
          Returns whether kill-log channel writer is allocated for current thread.
static void killsOut(java.lang.String message)
          Sends the given message to the killlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void killsOut(java.lang.String message, int priority)
          Sends the given message to the killlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void killsOut(java.lang.String module, java.lang.String message)
          Sends the given message to the killlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void killsOut(java.lang.String module, java.lang.String message, int priority)
          Sends the given message to the killlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static Log l(char threadCode)
          Returns the log object for the given threadgroup code, or null if unassigned.
 void log(java.util.logging.Level level, java.lang.String msg)
           
 void log(java.util.logging.Level level, java.lang.String msg, java.lang.Object param1)
           
 void log(java.util.logging.Level level, java.lang.String msg, java.lang.Object[] params)
           
 void log(java.util.logging.Level level, java.lang.String msg, java.lang.Throwable thrown)
           
 void log(java.util.logging.LogRecord record)
           
 void logp(java.util.logging.Level level, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String msg)
           
 void logp(java.util.logging.Level level, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String msg, java.lang.Object param1)
           
 void logp(java.util.logging.Level level, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String msg, java.lang.Object[] params)
           
 void logp(java.util.logging.Level level, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String msg, java.lang.Throwable thrown)
           
 void logrb(java.util.logging.Level level, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String bundleName, java.lang.String msg)
          Deprecated. 
 void logrb(java.util.logging.Level level, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String bundleName, java.lang.String msg, java.lang.Object param1)
          Deprecated. 
 void logrb(java.util.logging.Level level, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String bundleName, java.lang.String msg, java.lang.Object[] params)
          Deprecated. 
 void logrb(java.util.logging.Level level, java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.String bundleName, java.lang.String msg, java.lang.Throwable thrown)
          Deprecated. 
static java.lang.String makeLogEntry(Log.Type type, java.lang.String module, java.lang.String message)
          Will be used to create a standardized log header for file logs Usage: SysOutWriter.println(getLogHeader(S,LogType.info,module, message));
static Log newInstance()
          Forces the creation of a new, unconfigured Log object for the current thread group.
 int numLines()
          Returns number of lines in the log file, if any.
 void rawStandardOut(Log.Type type, java.lang.String line, int priority)
          Handles raw info logging entries.
static void rawSysOut(java.lang.String message)
          Sends the given line to the info channel, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void rawSysOut(java.lang.String message, int priority)
          Sends the given line to the info channel, if appropriate to do so, whether its to System.out, a file, both, or neither.
 void removeHandler(java.util.logging.Handler handler)
           
 void setFilter(java.util.logging.Filter newFilter)
           
 void setLevel(java.util.logging.Level newLevel)
           
 void setParent(java.util.logging.Logger parent)
           
 void setUseParentHandlers(boolean useParentHandlers)
           
 void severe(java.lang.String msg)
           
static void shareWith(char threadCode)
          Forces the current thread group to share a Log object with the one at the given threadcode.
 void shortExOut(Log.Type type, java.lang.String module, int priority, java.lang.Throwable e)
          Handles error logging entries.
 void standardExOut(Log.Type type, java.lang.String module, int priority, java.lang.Throwable e)
          Handles long exception logging entries.
static void sysOut(java.lang.String message)
          Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void sysOut(java.lang.String message, int priority)
          Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void sysOut(java.lang.String module, java.lang.String message)
          Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void sysOut(java.lang.String module, java.lang.String message, int priority)
          Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
 void throwing(java.lang.String sourceClass, java.lang.String sourceMethod, java.lang.Throwable thrown)
           
 void timeOut(Log.Type type, java.lang.String module, java.lang.String msg, int priority)
          Handles debug timing entries.
static boolean warnChannelAt(int priority)
          Returns whether warning channel writer is allocated for current thread for given priority.
static boolean warnChannelOn()
          Returns whether warning channel writer is allocated for current thread.
 void warning(java.lang.String msg)
           
static void warnOut(java.lang.String message)
          Sends the given message to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void warnOut(java.lang.String message, int priority)
          Sends the given message to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void warnOut(java.lang.String module, int priority, java.lang.Throwable e)
          Sends the given exception to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void warnOut(java.lang.String module, java.lang.String message)
          Sends the given message to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void warnOut(java.lang.String module, java.lang.String message, int priority)
          Sends the given message to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void warnOut(java.lang.String module, java.lang.Throwable e)
          Sends the given exception to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
static void warnOut(java.lang.Throwable e)
          Sends the given exception to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.
 
Methods inherited from class java.util.logging.Logger
getAnonymousLogger, getAnonymousLogger, getLogger, getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log

public Log()
Constructor for a log object. Will assign the constructed logger to the current thread group by taking the first character of the thread group name as its code. If all threadgroups have same first character, they will all share a log object. Either way, this needs to be called to construct the first logger.

Method Detail

l

public static final Log l(char threadCode)
Returns the log object for the given threadgroup code, or null if unassigned.

Parameters:
threadCode - the threadgroup code to check
Returns:
the Log object, or null

instance

public static final Log instance()
Returns a Log object for the current thread group. If one is not assigned, it will be instantiated, thus guaranteeing that a Log object always returns from this method.

Returns:
a Log object

newInstance

public static final Log newInstance()
Forces the creation of a new, unconfigured Log object for the current thread group.

Returns:
the new Log object

shareWith

public static final void shareWith(char threadCode)
Forces the current thread group to share a Log object with the one at the given threadcode. The one at the threadcode should already have been created before calling.

Parameters:
threadCode - the threadcode with an existing log

isMaskedErrMsg

public static final boolean isMaskedErrMsg(java.lang.String str)
Optional method to determine if message is a masked out throwable message type. Usage: if(isMaskedErrMsg(errException.getMessage()))

Parameters:
str - the message
Returns:
boolean TRUE if masked out.

getLogFilename

public final java.lang.String getLogFilename(Log.Type type)
Given a log type, return the default log file name or null.

Parameters:
type - the local log type
Returns:
the name of the default filename, or null is NA

configureLog

public final void configureLog(Log.Type type,
                               java.lang.String code)
Reset all of the log files ON, OFF, FILE, BOTH Usage: CMProps.initLog(Log.LogType.info,"ON");

Parameters:
type - the log to set the code for
code - the code

configureLog

public final void configureLog(Log.Type type,
                               java.lang.String code,
                               int numberOfLogs)
Reset all of the log files ON, OFF, FILE, BOTH Usage: CMProps.initLog(Log.LogType.info,"OWNFILE",20);

Parameters:
type - the log to set the code for
code - the code
numberOfLogs - if code = "OWNFILE", then how many back logs to keep

configureLogFile

public final void configureLogFile(java.lang.String logFilePath,
                                   int numberOfLogs)
Start all of the log files in the info temp directory Usage: configureLogFile("mud",5);

Parameters:
logFilePath - maximum name of files
numberOfLogs - maximum number of files

numLines

public final int numLines()
Returns number of lines in the log file, if any.

Returns:
a number >=0

getLogReader

public final Log.LogReader getLogReader()
Returns an internally managed log reader class to make reading lines from the log slightly easier

Returns:
reader for the log file

getLog

public final java.lang.StringBuffer getLog()
Returns the contents of the log file as a StringBuffer, if it exists

Returns:
the contents of the log file, or an empty stringbuffer

getLogLocation

public final java.lang.String getLogLocation()
Start all of the log files Usage: path = getLogLocation();

Returns:
the string representation of the file path

makeLogEntry

public static final java.lang.String makeLogEntry(Log.Type type,
                                                  java.lang.String module,
                                                  java.lang.String message)
Will be used to create a standardized log header for file logs Usage: SysOutWriter.println(getLogHeader(S,LogType.info,module, message));

Parameters:
type - type of information
module - the module name
message - the message to print
Returns:
String the header and message, formatted

infoOut

public static final void infoOut(java.lang.String message)
Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name. Since no priority is given, priority is set to lowest possible.

Parameters:
message - The message to print

sysOut

public static final void sysOut(java.lang.String message)
Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name. Since no priority is given, priority is set to lowest possible.

Parameters:
message - The message to print

debugOut

public static final void debugOut(java.lang.String message)
Sends the given message to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name. Since no priority is given, priority is set to lowest possible.

Parameters:
message - The message to print

errOut

public static final void errOut(java.lang.String message)
Sends the given message to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name. Since no priority is given, priority is set to lowest possible.

Parameters:
message - The message to print

warnOut

public static final void warnOut(java.lang.String message)
Sends the given message to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name. Since no priority is given, priority is set to lowest possible.

Parameters:
message - The message to print

helpOut

public static final void helpOut(java.lang.String message)
Sends the given message to the help channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name. Since no priority is given, priority is set to lowest possible.

Parameters:
message - The message to print

killsOut

public static final void killsOut(java.lang.String message)
Sends the given message to the killlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name. Since no priority is given, priority is set to lowest possible.

Parameters:
message - The message to print

combatOut

public static final void combatOut(java.lang.String message)
Sends the given message to the combatlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name. Since no priority is given, priority is set to lowest possible.

Parameters:
message - The message to print

accessOut

public static final void accessOut(java.lang.String message)
Sends the given message to the access channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name. Since no priority is given, priority is set to lowest possible.

Parameters:
message - The message to print

sysOut

public static final void sysOut(java.lang.String module,
                                java.lang.String message)
Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no priority is given, priority is set to lowest possible.

Parameters:
module - The module name to prefix the message with
message - The message to print

infoOut

public static final void infoOut(java.lang.String module,
                                 java.lang.String message)
Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no priority is given, priority is set to lowest possible.

Parameters:
module - The module name to prefix the message with
message - The message to print

errOut

public static final void errOut(java.lang.String module,
                                java.lang.String message)
Sends the given message to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no priority is given, priority is set to lowest possible.

Parameters:
module - The module name to prefix the message with
message - The message to print

warnOut

public static final void warnOut(java.lang.String module,
                                 java.lang.String message)
Sends the given message to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no priority is given, priority is set to lowest possible.

Parameters:
module - The module name to prefix the message with
message - The message to print

debugOut

public static final void debugOut(java.lang.String module,
                                  java.lang.String message)
Sends the given message to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no priority is given, priority is set to lowest possible.

Parameters:
module - The module name to prefix the message with
message - The message to print

helpOut

public static final void helpOut(java.lang.String module,
                                 java.lang.String message)
Sends the given message to the help channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no priority is given, priority is set to lowest possible.

Parameters:
module - The module name to prefix the message with
message - The message to print

killsOut

public static final void killsOut(java.lang.String module,
                                  java.lang.String message)
Sends the given message to the killlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no priority is given, priority is set to lowest possible.

Parameters:
module - The module name to prefix the message with
message - The message to print

combatOut

public static final void combatOut(java.lang.String module,
                                   java.lang.String message)
Sends the given message to the combat channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no priority is given, priority is set to lowest possible.

Parameters:
module - The module name to prefix the message with
message - The message to print

accessOut

public static final void accessOut(java.lang.String module,
                                   java.lang.String message)
Sends the given message to the access channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no priority is given, priority is set to lowest possible.

Parameters:
module - The module name to prefix the message with
message - The message to print

debugOut

public static final void debugOut(java.lang.String module,
                                  java.lang.Throwable e)
Sends the given exception to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no priority is given, priority is set to lowest possible.

Parameters:
module - The module name to prefix the message with
e - The exception to send out the stack and message of

errOut

public static final void errOut(java.lang.String module,
                                java.lang.Throwable e)
Sends the given exception to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no priority is given, priority is set to lowest possible.

Parameters:
module - The module name to prefix the message with
e - The exception to send out the stack and message of

warnOut

public static final void warnOut(java.lang.String module,
                                 java.lang.Throwable e)
Sends the given exception to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no priority is given, priority is set to lowest possible.

Parameters:
module - The module name to prefix the message with
e - The exception to send out the stack and message of

debugOut

public static final void debugOut(java.lang.Throwable e)
Sends the given exception to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name. Since no priority is given, priority is set to lowest possible.

Parameters:
e - The exception to send out the stack and message of

errOut

public static final void errOut(java.lang.Throwable e)
Sends the given exception to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name. Since no priority is given, priority is set to lowest possible.

Parameters:
e - The exception to send out the stack and message of

warnOut

public static final void warnOut(java.lang.Throwable e)
Sends the given exception to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name. Since no priority is given, priority is set to lowest possible.

Parameters:
e - The exception to send out the stack and message of

rawSysOut

public static final void rawSysOut(java.lang.String message)
Sends the given line to the info channel, if appropriate to do so, whether its to System.out, a file, both, or neither. No module, timestamp, nothing .. just raw OUT. Since no priority is given, the lowest possible is assigned.

Parameters:
message - the message to send exactly as-is.

infoOut

public static final void infoOut(java.lang.String message,
                                 int priority)
Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name.

Parameters:
message - the base message to send to the log
priority - the priority level to give to this message

sysOut

public static final void sysOut(java.lang.String message,
                                int priority)
Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name.

Parameters:
message - the base message to send to the log
priority - the priority level to give to this message

debugOut

public static final void debugOut(java.lang.String message,
                                  int priority)
Sends the given message to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name.

Parameters:
message - the base message to send to the log
priority - the priority level to give to this message

errOut

public static final void errOut(java.lang.String message,
                                int priority)
Sends the given message to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name.

Parameters:
message - the base message to send to the log
priority - the priority level to give to this message

warnOut

public static final void warnOut(java.lang.String message,
                                 int priority)
Sends the given message to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name.

Parameters:
message - the base message to send to the log
priority - the priority level to give to this message

helpOut

public static final void helpOut(java.lang.String message,
                                 int priority)
Sends the given message to the help channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name.

Parameters:
message - the base message to send to the log
priority - the priority level to give to this message

killsOut

public static final void killsOut(java.lang.String message,
                                  int priority)
Sends the given message to the killlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name.

Parameters:
message - the base message to send to the log
priority - the priority level to give to this message

combatOut

public static final void combatOut(java.lang.String message,
                                   int priority)
Sends the given message to the combatlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither. Since no module name is given, the module name is set to the current thread name.

Parameters:
message - the base message to send to the log
priority - the priority level to give to this message

infoOut

public static final void infoOut(java.lang.String module,
                                 java.lang.String message,
                                 int priority)
Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.

Parameters:
module - the module name to prefix the main message with
message - the base message to send to the log
priority - the priority level to give to this message

sysOut

public static final void sysOut(java.lang.String module,
                                java.lang.String message,
                                int priority)
Sends the given message to the info channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.

Parameters:
module - the module name to prefix the main message with
message - the base message to send to the log
priority - the priority level to give to this message

errOut

public static final void errOut(java.lang.String module,
                                java.lang.String message,
                                int priority)
Sends the given message to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.

Parameters:
module - the module name to prefix the main message with
message - the base message to send to the log
priority - the priority level to give to this message

warnOut

public static final void warnOut(java.lang.String module,
                                 java.lang.String message,
                                 int priority)
Sends the given message to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.

Parameters:
module - the module name to prefix the main message with
message - the base message to send to the log
priority - the priority level to give to this message

debugOut

public static final void debugOut(java.lang.String module,
                                  java.lang.String message,
                                  int priority)
Sends the given message to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.

Parameters:
module - the module name to prefix the main message with
message - the base message to send to the log
priority - the priority level to give to this message

helpOut

public static final void helpOut(java.lang.String module,
                                 java.lang.String message,
                                 int priority)
Sends the given message to the help channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.

Parameters:
module - the module name to prefix the main message with
message - the base message to send to the log
priority - the priority level to give to this message

killsOut

public static final void killsOut(java.lang.String module,
                                  java.lang.String message,
                                  int priority)
Sends the given message to the killlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.

Parameters:
module - the module name to prefix the main message with
message - the base message to send to the log
priority - the priority level to give to this message

combatOut

public static final void combatOut(java.lang.String module,
                                   java.lang.String message,
                                   int priority)
Sends the given message to the combatlog channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.

Parameters:
module - the module name to prefix the main message with
message - the base message to send to the log
priority - the priority level to give to this message

accessOut

public static final void accessOut(java.lang.String module,
                                   java.lang.String message,
                                   int priority)
Sends the given message to the access channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.

Parameters:
module - the module name to prefix the main message with
message - the base message to send to the log
priority - the priority level to give to this message

debugOut

public static final void debugOut(java.lang.String module,
                                  int priority,
                                  java.lang.Exception e)
Sends the given exception to the debug channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.

Parameters:
module - the module name to prefix the main message with
e - the exception to send the stack trace and message of
priority - the priority level to give to this message

errOut

public static final void errOut(java.lang.String module,
                                int priority,
                                java.lang.Throwable e)
Sends the given exception to the error channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.

Parameters:
module - the module name to prefix the main message with
e - the exception to send the stack trace and message of
priority - the priority level to give to this message

warnOut

public static final void warnOut(java.lang.String module,
                                 int priority,
                                 java.lang.Throwable e)
Sends the given exception to the warning channel log, if appropriate to do so, whether its to System.out, a file, both, or neither.

Parameters:
module - the module name to prefix the main message with
e - the exception to send the stack trace and message of
priority - the priority level to give to this message

rawSysOut

public static final void rawSysOut(java.lang.String message,
                                   int priority)
Sends the given line to the info channel, if appropriate to do so, whether its to System.out, a file, both, or neither. No module, timestamp, nothing .. just raw OUT.

Parameters:
message - the message to send exactly as-is.
priority - the priority to assign to this line of text

standardExOut

public final void standardExOut(Log.Type type,
                                java.lang.String module,
                                int priority,
                                java.lang.Throwable e)
Handles long exception logging entries. Sends them to System.out, the log file, or nowhere. Usage: standardExOut(Thread.currentThread().getName(),message);

Parameters:
type - The channel to print to
module - The module to print
priority - the priority level to give to this message
e - The exception whose string one wishes to print

shortExOut

public final void shortExOut(Log.Type type,
                             java.lang.String module,
                             int priority,
                             java.lang.Throwable e)
Handles error logging entries. Sends them to System.out, the log file, or nowhere. Usage: shortExOut(LogType.info,Thread.currentThread().getName(),message);

Parameters:
type - The type of channel
module - The message to print
priority - the priority level to give to this message
e - The exception whose string one wishes to print

rawStandardOut

public final void rawStandardOut(Log.Type type,
                                 java.lang.String line,
                                 int priority)
Handles raw info logging entries. Sends them to System.out, the log file, or nowhere. Usage: rawStandardOut(LogType.info,"REQ-OUT:"+REQ);

Parameters:
type - The type of message
line - The message to print
priority - The priority of the message, high is less priority, 0=always

timeOut

public final void timeOut(Log.Type type,
                          java.lang.String module,
                          java.lang.String msg,
                          int priority)
Handles debug timing entries. Sends them to System.out, the log file, or nowhere. Usage: timeOut(LogType.info,Thread.currentThread().getName(),message);

Parameters:
type - Channel name
module - The file name
msg - The message to print
priority - The priority of the message, high is less priority, 0=always

close

public final void close()
Shut down this class forever


errorChannelOn

public static final boolean errorChannelOn()
Returns whether error channel writer is allocated for current thread.

Returns:
whether error channel writer is allocated for current thread.

helpChannelOn

public static final boolean helpChannelOn()
Returns whether help channel writer is allocated for current thread.

Returns:
whether help channel writer is allocated for current thread.

debugChannelOn

public static final boolean debugChannelOn()
Returns whether debug channel writer is allocated for current thread.

Returns:
whether debug channel writer is allocated for current thread.

infoChannelOn

public static final boolean infoChannelOn()
Returns whether info channel writer is allocated for current thread.

Returns:
whether info channel writer is allocated for current thread.

warnChannelOn

public static final boolean warnChannelOn()
Returns whether warning channel writer is allocated for current thread.

Returns:
whether warning channel writer is allocated for current thread.

killsChannelOn

public static final boolean killsChannelOn()
Returns whether kill-log channel writer is allocated for current thread.

Returns:
whether kill-log channel writer is allocated for current thread.

combatChannelOn

public static final boolean combatChannelOn()
Returns whether combat-log channel writer is allocated for current thread.

Returns:
whether combat-log channel writer is allocated for current thread.

accessChannelOn

public static final boolean accessChannelOn()
Returns whether access-log channel writer is allocated for current thread.

Returns:
whether access-log channel writer is allocated for current thread.

errorChannelAt

public static final boolean errorChannelAt(int priority)
Returns whether error channel writer is allocated for current thread for given priority.

Parameters:
priority - priority level to check for writer at
Returns:
whether error channel writer is allocated for current thread for given priority.

helpChannelAt

public static final boolean helpChannelAt(int priority)
Returns whether help channel writer is allocated for current thread for given priority.

Parameters:
priority - priority level to check for writer at
Returns:
whether help channel writer is allocated for current thread for given priority.

debugChannelAt

public static final boolean debugChannelAt(int priority)
Returns whether debug channel writer is allocated for current thread for given priority.

Parameters:
priority - priority level to check for writer at
Returns:
whether debug channel writer is allocated for current thread for given priority.

infoChannelAt

public static final boolean infoChannelAt(int priority)
Returns whether info channel writer is allocated for current thread for given priority.

Parameters:
priority - priority level to check for writer at
Returns:
whether info channel writer is allocated for current thread for given priority.

warnChannelAt

public static final boolean warnChannelAt(int priority)
Returns whether warning channel writer is allocated for current thread for given priority.

Parameters:
priority - priority level to check for writer at
Returns:
whether warning channel writer is allocated for current thread for given priority.

killsChannelAt

public static final boolean killsChannelAt(int priority)
Returns whether kill-log channel writer is allocated for current thread for given priority.

Parameters:
priority - priority level to check for writer at
Returns:
whether kill-log channel writer is allocated for current thread for given priority.

combatChannelAt

public static final boolean combatChannelAt(int priority)
Returns whether combat-log channel writer is allocated for current thread for given priority.

Parameters:
priority - priority level to check for writer at
Returns:
whether combat-log channel writer is allocated for current thread for given priority.

accessChannelAt

public static final boolean accessChannelAt(int priority)
Returns whether access-log channel writer is allocated for current thread for given priority.

Parameters:
priority - priority level to check for writer at
Returns:
whether access-log channel writer is allocated for current thread for given priority.

addHandler

public void addHandler(java.util.logging.Handler handler)
Overrides:
addHandler in class java.util.logging.Logger

config

public void config(java.lang.String msg)
Overrides:
config in class java.util.logging.Logger

entering

public void entering(java.lang.String sourceClass,
                     java.lang.String sourceMethod)
Overrides:
entering in class java.util.logging.Logger

entering

public void entering(java.lang.String sourceClass,
                     java.lang.String sourceMethod,
                     java.lang.Object param1)
Overrides:
entering in class java.util.logging.Logger

entering

public void entering(java.lang.String sourceClass,
                     java.lang.String sourceMethod,
                     java.lang.Object[] params)
Overrides:
entering in class java.util.logging.Logger

exiting

public void exiting(java.lang.String sourceClass,
                    java.lang.String sourceMethod)
Overrides:
exiting in class java.util.logging.Logger

exiting

public void exiting(java.lang.String sourceClass,
                    java.lang.String sourceMethod,
                    java.lang.Object result)
Overrides:
exiting in class java.util.logging.Logger

fine

public void fine(java.lang.String msg)
Overrides:
fine in class java.util.logging.Logger

finer

public void finer(java.lang.String msg)
Overrides:
finer in class java.util.logging.Logger

finest

public void finest(java.lang.String msg)
Overrides:
finest in class java.util.logging.Logger

getFilter

public java.util.logging.Filter getFilter()
Overrides:
getFilter in class java.util.logging.Logger

getHandlers

public java.util.logging.Handler[] getHandlers()
Overrides:
getHandlers in class java.util.logging.Logger

getLevel

public java.util.logging.Level getLevel()
Overrides:
getLevel in class java.util.logging.Logger

getName

public java.lang.String getName()
Overrides:
getName in class java.util.logging.Logger

getParent

public java.util.logging.Logger getParent()
Overrides:
getParent in class java.util.logging.Logger

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Overrides:
getResourceBundle in class java.util.logging.Logger

getResourceBundleName

public java.lang.String getResourceBundleName()
Overrides:
getResourceBundleName in class java.util.logging.Logger

getUseParentHandlers

public boolean getUseParentHandlers()
Overrides:
getUseParentHandlers in class java.util.logging.Logger

info

public void info(java.lang.String msg)
Overrides:
info in class java.util.logging.Logger

isLoggable

public boolean isLoggable(java.util.logging.Level level)
Overrides:
isLoggable in class java.util.logging.Logger

log

public void log(java.util.logging.Level level,
                java.lang.String msg)
Overrides:
log in class java.util.logging.Logger

log

public void log(java.util.logging.Level level,
                java.lang.String msg,
                java.lang.Object param1)
Overrides:
log in class java.util.logging.Logger

log

public void log(java.util.logging.Level level,
                java.lang.String msg,
                java.lang.Object[] params)
Overrides:
log in class java.util.logging.Logger

log

public void log(java.util.logging.Level level,
                java.lang.String msg,
                java.lang.Throwable thrown)
Overrides:
log in class java.util.logging.Logger

log

public void log(java.util.logging.LogRecord record)
Overrides:
log in class java.util.logging.Logger

logp

public void logp(java.util.logging.Level level,
                 java.lang.String sourceClass,
                 java.lang.String sourceMethod,
                 java.lang.String msg)
Overrides:
logp in class java.util.logging.Logger

logp

public void logp(java.util.logging.Level level,
                 java.lang.String sourceClass,
                 java.lang.String sourceMethod,
                 java.lang.String msg,
                 java.lang.Object param1)
Overrides:
logp in class java.util.logging.Logger

logp

public void logp(java.util.logging.Level level,
                 java.lang.String sourceClass,
                 java.lang.String sourceMethod,
                 java.lang.String msg,
                 java.lang.Object[] params)
Overrides:
logp in class java.util.logging.Logger

logp

public void logp(java.util.logging.Level level,
                 java.lang.String sourceClass,
                 java.lang.String sourceMethod,
                 java.lang.String msg,
                 java.lang.Throwable thrown)
Overrides:
logp in class java.util.logging.Logger

logrb

@Deprecated
public void logrb(java.util.logging.Level level,
                             java.lang.String sourceClass,
                             java.lang.String sourceMethod,
                             java.lang.String bundleName,
                             java.lang.String msg)
Deprecated. 

Overrides:
logrb in class java.util.logging.Logger

logrb

@Deprecated
public void logrb(java.util.logging.Level level,
                             java.lang.String sourceClass,
                             java.lang.String sourceMethod,
                             java.lang.String bundleName,
                             java.lang.String msg,
                             java.lang.Object param1)
Deprecated. 

Overrides:
logrb in class java.util.logging.Logger

logrb

@Deprecated
public void logrb(java.util.logging.Level level,
                             java.lang.String sourceClass,
                             java.lang.String sourceMethod,
                             java.lang.String bundleName,
                             java.lang.String msg,
                             java.lang.Object[] params)
Deprecated. 

Overrides:
logrb in class java.util.logging.Logger

logrb

@Deprecated
public void logrb(java.util.logging.Level level,
                             java.lang.String sourceClass,
                             java.lang.String sourceMethod,
                             java.lang.String bundleName,
                             java.lang.String msg,
                             java.lang.Throwable thrown)
Deprecated. 

Overrides:
logrb in class java.util.logging.Logger

removeHandler

public void removeHandler(java.util.logging.Handler handler)
Overrides:
removeHandler in class java.util.logging.Logger

setFilter

public void setFilter(java.util.logging.Filter newFilter)
Overrides:
setFilter in class java.util.logging.Logger

setLevel

public void setLevel(java.util.logging.Level newLevel)
Overrides:
setLevel in class java.util.logging.Logger

setParent

public void setParent(java.util.logging.Logger parent)
Overrides:
setParent in class java.util.logging.Logger

setUseParentHandlers

public void setUseParentHandlers(boolean useParentHandlers)
Overrides:
setUseParentHandlers in class java.util.logging.Logger

severe

public void severe(java.lang.String msg)
Overrides:
severe in class java.util.logging.Logger

throwing

public void throwing(java.lang.String sourceClass,
                     java.lang.String sourceMethod,
                     java.lang.Throwable thrown)
Overrides:
throwing in class java.util.logging.Logger

warning

public void warning(java.lang.String msg)
Overrides:
warning in class java.util.logging.Logger