org.alicebot.server.core.util
Class Trace

java.lang.Object
  extended by org.alicebot.server.core.util.Trace

public class Trace
extends java.lang.Object

Notifies of message formatting to the console for tracing and debugging. There are a lot of very similar, trivial methods here; the only goal is to save some typing for the developer.

Version:
4.1.3
Author:
Noel Bush

Field Summary
static java.lang.String COLON_SPACE
          ": ".
static java.lang.String DEVELOPER_ERROR
          Flag for a developer failure message to the console.
static java.lang.String DEVELOPER_INFO
          Flag for a developer info message to the console.
static java.lang.String INSIST
          Flag for an insistent message.
static java.lang.String NO_FLAG
          No flag (an empty string).
static java.lang.String PROGRAM_MESSAGE
          Flag for a program message to the console.
static java.lang.String USER_ERROR
          Flag for a user failure message to the console.
static java.lang.String USER_INFO
          Flag for a user info message to the console.
 
Constructor Summary
Trace()
           
 
Method Summary
static void devfail(java.lang.String message)
          Handle developer failure from which recovery is impossible.
static void devfail(java.lang.String message, java.lang.Throwable e)
          Notifies of developer failure from which recovery is impossible.
static void devfail(java.lang.Throwable e)
          Notifies of developer failure from which recovery is impossible.
static void devinfo(java.lang.String message)
          Prints developer debug messages.
static void devinfo(java.lang.Throwable e)
          Notifies of developer-level exception.
static void insist(java.lang.String message)
          Insists on printing a message even if display flags are false.
static void insist(java.lang.String[] message)
          Insists on printing a message even if display flags are false.
static void setOut(java.io.PrintStream out)
          Changes the output stream.
static void userfail(java.lang.String message)
          Notifies of user failures from which recovery is impossible.
static void userfail(java.lang.Throwable e)
          Notifies of user failures from which recovery is impossible.
static void userinfo(java.lang.String message)
          Prints informative message to user.
static void userinfo(java.lang.String[] message)
          Prints multi-line informative message to user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_FLAG

public static final java.lang.String NO_FLAG
No flag (an empty string).

See Also:
Constant Field Values

PROGRAM_MESSAGE

public static final java.lang.String PROGRAM_MESSAGE
Flag for a program message to the console.


USER_INFO

public static final java.lang.String USER_INFO
Flag for a user info message to the console.


USER_ERROR

public static final java.lang.String USER_ERROR
Flag for a user failure message to the console.


DEVELOPER_INFO

public static final java.lang.String DEVELOPER_INFO
Flag for a developer info message to the console.


DEVELOPER_ERROR

public static final java.lang.String DEVELOPER_ERROR
Flag for a developer failure message to the console.


INSIST

public static final java.lang.String INSIST
Flag for an insistent message.


COLON_SPACE

public static final java.lang.String COLON_SPACE
": ".

See Also:
Constant Field Values
Constructor Detail

Trace

public Trace()
Method Detail

setOut

public static void setOut(java.io.PrintStream out)
Changes the output stream.

Parameters:
stream -

userfail

public static void userfail(java.lang.String message)
Notifies of user failures from which recovery is impossible.

Parameters:
message -

userfail

public static void userfail(java.lang.Throwable e)
Notifies of user failures from which recovery is impossible.

Parameters:
exception -

userinfo

public static void userinfo(java.lang.String message)
Prints informative message to user.

Parameters:
message -

userinfo

public static void userinfo(java.lang.String[] message)
Prints multi-line informative message to user.

Parameters:
message -

devfail

public static void devfail(java.lang.String message)
Handle developer failure from which recovery is impossible.

Parameters:
message -

devfail

public static void devfail(java.lang.String message,
                           java.lang.Throwable e)
Notifies of developer failure from which recovery is impossible.

Parameters:
message -
exception -

devfail

public static void devfail(java.lang.Throwable e)
Notifies of developer failure from which recovery is impossible.

Parameters:
exception -

devinfo

public static void devinfo(java.lang.String message)
Prints developer debug messages.

Parameters:
message -

devinfo

public static void devinfo(java.lang.Throwable e)
Notifies of developer-level exception.

Parameters:
exception -

insist

public static void insist(java.lang.String message)
Insists on printing a message even if display flags are false.

Parameters:
message -

insist

public static void insist(java.lang.String[] message)
Insists on printing a message even if display flags are false.

Parameters:
multi-line - message