|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.media.mn8.LogManager
Class responsible for managing logging messages. Loading them from the resource bundles and properly displaying them on the requested writer.
Field Summary | |
static int |
DEBUG
|
static int |
ERROR
|
static int |
VERBOSE
|
Constructor Summary | |
LogManager()
|
Method Summary | |
static OutputStream |
getOutputStream()
Returns the default error output stream . |
protected static boolean |
isDebug()
|
protected static boolean |
isVerbose()
|
static void |
message(Exception generatorException,
String message)
Prints an message previously formated probably by MessageFormatter. |
static void |
message(int severity,
String message)
|
static void |
message(String message)
Prints an message, formated previously probably by MessageFormatter. |
static void |
message(String type_id,
String message_id)
The main method for displaying system messages for mn8. |
static void |
message(String type_id,
String message_id,
String optional)
The main method for displaying system messages for mn8. |
static void |
message(String type_id,
String message_id,
String optional,
String suplement)
The main method for displaying system messages for mn8. |
static void |
setOutputStream(PrintStream out)
Permits another output stream (a file output stream as example) to be the default error output stream. |
protected static void |
sysMessage(String message)
|
protected static void |
sysMessage(String message,
Exception ex)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int VERBOSE
public static final int DEBUG
public static final int ERROR
Constructor Detail |
public LogManager()
Method Detail |
public static void setOutputStream(PrintStream out)
public static OutputStream getOutputStream()
PrintStream
which is default error output stream.public static void message(String type_id, String message_id)
type_id
- The type of the messages (error, warning, ...). This is
actually an key in the resource bundle where the actual value which will be
displayed is hold. mn8.messages.type. has to be inserted before the key in the resource
bundle to store such messages types.
mn8.messages.type.warning=[WARNING]
message_id
- The id of the messages. This is
actually an key in the resource bundle where the actual value which will be
displayed is hold. mn8.messages. has to be inserted before the key in the resource
bundle to store such messages.
mn8.messages.file_missing=Sorry the file: xxx.jar \n is mising.
public static void message(String type_id, String message_id, String optional)
type_id
- The type of the messages (error, warning, ...). This is
actually an key in the resource bundle where the actual value which will be
displayed is hold. mn8.messages.type. has to be inserted before the key in the resource
bundle to store such messages types.
mn8.messages.type.warning=[WARNING]
message_id
- The id of the messages. This is
actually an key in the resource bundle where the actual value which will be
displayed is hold. mn8.messages. has to be inserted before the key in the resource
bundle to store such messages.
mn8.messages.file_missing=Sorry the file: xxx.jar \n is mising.
optional
- Another text to be added to the message. Usualy displayed on the same line.public static void message(String type_id, String message_id, String optional, String suplement)
type_id
- The type of the messages (error, warning, ...). This is
actually an key in the resource bundle where the actual value which will be
displayed is hold. mn8.messages.type. has to be inserted before the key in the resource
bundle to store such messages types.
mn8.messages.type.warning=[WARNING]
message_id
- The id of the messages. This is
actually an key in the resource bundle where the actual value which will be
displayed is hold. mn8.messages. has to be inserted before the key in the resource
bundle to store such messages.
mn8.messages.file_missing=Sorry the file: xxx.jar \n is mising.
optional
- Another text to be added to the message. Usualy displayed on the same line.suplement
- Another text to be added to the message. Usualy displayed on another line.public static void message(String message)
message
- The message to be displayed.public static void message(int severity, String message)
public static void message(Exception generatorException, String message)
generatorException
- The exception who triggered this message.message
- The message to be displayed.protected static void sysMessage(String message)
protected static void sysMessage(String message, Exception ex)
protected static boolean isVerbose()
protected static boolean isDebug()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |