org.alicebot.server.core.logging
Class Log

java.lang.Object
  extended by org.alicebot.server.core.logging.Log

public class Log
extends java.lang.Object

Notifies of logging of Alicebot events to log files.

Version:
4.1.3
Author:
Jon Baer, Thomas Ringate, Pedro Colla, Noel Bush

Field Summary
static java.lang.String CHAT
          Chat log path.
static java.lang.String DATABASE
          Database log path.
static java.lang.String ERROR
          Error log path.
static java.lang.String GOSSIP
          Gossip log path.
static java.lang.String INTERPRETER
          Interpreter log path.
static java.lang.String LEARN
          Learn log path.
static java.lang.String LISTENERS
          Listener log path.
static java.lang.String MERGE
          Merge log path.
static java.lang.String RUNTIME
          General runtime information log path.
static java.lang.String STARTUP
          Startup log path.
static java.lang.String SYSTEM
          OS shell use log path.
static java.lang.String TARGETING
          Targeting log path.
 
Constructor Summary
Log()
           
 
Method Summary
static void devfail(DeveloperError e)
          Notifies of developer error exceptions.
static void devfail(java.lang.RuntimeException e)
          Notifies of runtime exceptions.
static void devfail(java.lang.String message, java.lang.String type)
          Logs a message and prints it to the console as a developer failure message.
static void devfail(java.lang.String message, java.lang.String[] types)
          Same as devfail(String, String), but logs to multiple log files.
static void devfail(java.lang.String message, java.lang.Throwable exception, java.lang.String type)
          Logs a message and an exception and prints them to the console as a developer failure message.
static void devinfo(java.lang.String message, java.lang.String type)
          Logs a message and prints it to the console as a developer info message.
static void devinfo(java.lang.String message, java.lang.String[] types)
          Same as devinfo(String, String), but logs to multiple log files.
static void log(java.lang.String[] message, java.lang.String type)
          Writes a multiline log message to the appropriate logfile.
static void log(java.lang.String message, java.lang.String type)
          Writes a message to the appropriate logfile.
static void log(java.lang.Throwable exception, java.lang.String type)
          Logs an exception to the appropriate logfile.
static void userfail(java.lang.String[] message, java.lang.String type)
          Logs a multiline message and prints it to the console as a user failure message.
static void userfail(java.lang.String[] message, java.lang.String[] types)
          Same as userfail(String, String[]), but logs multi-line messages.
static void userfail(java.lang.String message, java.lang.String type)
          Logs a message and prints it to the console as a user failure message.
static void userfail(java.lang.String message, java.lang.String[] types)
          Same as userfail(String, String), but logs to multiple log files.
static void userfail(java.lang.String message, java.lang.Throwable exception, java.lang.String type)
          Logs a message and an exception and prints them to the console as a user failure message.
static void userfail(UserError e)
          Notifies of user error exceptions.
static void userinfo(java.lang.String[] message, java.lang.String type)
          Logs a multiline message and prints it to the console as a user info message.
static void userinfo(java.lang.String[] message, java.lang.String[] types)
          Same as userinfo(String[], String), but logs to multiple log files.
static void userinfo(java.lang.String message, java.lang.String type)
          Logs a message and prints it to the console as a user info message.
static void userinfo(java.lang.String message, java.lang.String[] types)
          Same as userinfo(String, String), but logs to multiple log files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHAT

public static final java.lang.String CHAT
Chat log path.


LISTENERS

public static final java.lang.String LISTENERS
Listener log path.


DATABASE

public static final java.lang.String DATABASE
Database log path.


ERROR

public static final java.lang.String ERROR
Error log path.


GOSSIP

public static final java.lang.String GOSSIP
Gossip log path.


INTERPRETER

public static final java.lang.String INTERPRETER
Interpreter log path.


LEARN

public static final java.lang.String LEARN
Learn log path.


MERGE

public static final java.lang.String MERGE
Merge log path.


STARTUP

public static final java.lang.String STARTUP
Startup log path.


SYSTEM

public static final java.lang.String SYSTEM
OS shell use log path.


TARGETING

public static final java.lang.String TARGETING
Targeting log path.


RUNTIME

public static final java.lang.String RUNTIME
General runtime information log path.

Constructor Detail

Log

public Log()
Method Detail

log

public static void log(java.lang.String message,
                       java.lang.String type)
Writes a message to the appropriate logfile.

Parameters:
message - the text of the log event
type - the type of the log event (one of ACCESS, CHAT, DATABASE, DEBUG, ERROR, EVENT, GOSSIP, INTERPRETER, MERGE, SERVLET, STARTUP, SYSTEM, TARGETING)

log

public static void log(java.lang.Throwable exception,
                       java.lang.String type)
Logs an exception to the appropriate logfile.

Parameters:
exception - the exception
type - the type of the log event (one of ACCESS, CHAT, DATABASE, DEBUG, ERROR, EVENT, GOSSIP, INTERPRETER, MERGE, SERVLET, STARTUP, SYSTEM, TARGETING)

log

public static void log(java.lang.String[] message,
                       java.lang.String type)
Writes a multiline log message to the appropriate logfile.

Parameters:
message - the text of the log event
type - the type of the log event (one of ACCESS, CHAT, DATABASE, DEBUG, ERROR, EVENT, GOSSIP, INTERPRETER, MERGE, SERVLET, STARTUP, SYSTEM, TARGETING)

userinfo

public static void userinfo(java.lang.String message,
                            java.lang.String type)
Logs a message and prints it to the console as a user info message.

Parameters:
message - the text of the log event
type - the type of the log event (one of ACCESS, CHAT, DATABASE, DEBUG, ERROR, EVENT, GOSSIP, INTERPRETER, MERGE, SERVLET, STARTUP, SYSTEM)

userinfo

public static void userinfo(java.lang.String message,
                            java.lang.String[] types)
Same as userinfo(String, String), but logs to multiple log files.

Parameters:
message - the text of the log event
types - the log types

userinfo

public static void userinfo(java.lang.String[] message,
                            java.lang.String type)
Logs a multiline message and prints it to the console as a user info message.

Parameters:
message - the text of the log event
type - the type of the log event (one of ACCESS, CHAT, DATABASE, DEBUG, ERROR, EVENT, GOSSIP, INTERPRETER, MERGE, SERVLET, STARTUP, SYSTEM)

userinfo

public static void userinfo(java.lang.String[] message,
                            java.lang.String[] types)
Same as userinfo(String[], String), but logs to multiple log files.

Parameters:
message - the text of the log event
types - the log types

userfail

public static void userfail(java.lang.String message,
                            java.lang.String type)
Logs a message and prints it to the console as a user failure message.

Parameters:
message - the text of the log event
type - the type of the log event (one of ACCESS, CHAT, DATABASE, DEBUG, ERROR, EVENT, GOSSIP, INTERPRETER, MERGE, SERVLET, STARTUP, SYSTEM)

userfail

public static void userfail(java.lang.String[] message,
                            java.lang.String type)
Logs a multiline message and prints it to the console as a user failure message.

Parameters:
message - the text of the log event
type - the type of the log event (one of ACCESS, CHAT, DATABASE, DEBUG, ERROR, EVENT, GOSSIP, INTERPRETER, MERGE, SERVLET, STARTUP, SYSTEM)

userfail

public static void userfail(java.lang.String message,
                            java.lang.String[] types)
Same as userfail(String, String), but logs to multiple log files.

Parameters:
message - the text of the log event
types - the log types

userfail

public static void userfail(java.lang.String[] message,
                            java.lang.String[] types)
Same as userfail(String, String[]), but logs multi-line messages.

Parameters:
message - the text of the log event
types - the log types

userfail

public static void userfail(java.lang.String message,
                            java.lang.Throwable exception,
                            java.lang.String type)
Logs a message and an exception and prints them to the console as a user failure message.

Parameters:
message - the text of the log event
type - the type of the log event (one of ACCESS, CHAT, DATABASE, DEBUG, ERROR, EVENT, GOSSIP, INTERPRETER, MERGE, SERVLET, STARTUP, SYSTEM)

userfail

public static void userfail(UserError e)
Notifies of user error exceptions.


devinfo

public static void devinfo(java.lang.String message,
                           java.lang.String type)
Logs a message and prints it to the console as a developer info message.

Parameters:
message - the text of the log event
type - the type of the log event (one of ACCESS, CHAT, DATABASE, DEBUG, ERROR, EVENT, GOSSIP, INTERPRETER, MERGE, SERVLET, STARTUP, SYSTEM)

devinfo

public static void devinfo(java.lang.String message,
                           java.lang.String[] types)
Same as devinfo(String, String), but logs to multiple log files.

Parameters:
message - the text of the log event
types - the log types

devfail

public static void devfail(java.lang.String message,
                           java.lang.String type)
Logs a message and prints it to the console as a developer failure message.

Parameters:
message - the text of the log event
type - the type of the log event (one of ACCESS, CHAT, DATABASE, DEBUG, ERROR, EVENT, GOSSIP, INTERPRETER, MERGE, SERVLET, STARTUP, SYSTEM)

devfail

public static void devfail(java.lang.String message,
                           java.lang.Throwable exception,
                           java.lang.String type)
Logs a message and an exception and prints them to the console as a developer failure message.

Parameters:
message - the text of the log event
exception - the exception
type - the type of the log event (one of ACCESS, CHAT, DATABASE, DEBUG, ERROR, EVENT, GOSSIP, INTERPRETER, MERGE, SERVLET, STARTUP, SYSTEM)

devfail

public static void devfail(java.lang.String message,
                           java.lang.String[] types)
Same as devfail(String, String), but logs to multiple log files.

Parameters:
message - the text of the log event
types - the log types

devfail

public static void devfail(DeveloperError e)
Notifies of developer error exceptions.


devfail

public static void devfail(java.lang.RuntimeException e)
Notifies of runtime exceptions.