org.media.mn8
Class LogManager
java.lang.Object
|
+--org.media.mn8.LogManager
- public class LogManager
- extends java.lang.Object
Class responsible for managing logging messages. Loading them from the resource
bundles and properly displaying them on the requested writer.
- Version:
- $Revision: 1.5 $ $Date: 2001/09/27 00:23:16 $
- Author:
- Remus Pereni
Method Summary |
static java.io.OutputStream |
getOutputStream()
Returns the default error output stream . |
protected static boolean |
isDebug()
|
protected static boolean |
isVerbose()
|
static void |
message(java.lang.Exception generatorException,
java.lang.String message)
Prints an message previously formated probably by MessageFormatter. |
static void |
message(int severity,
java.lang.String message)
|
static void |
message(java.lang.String message)
Prints an message, formated previously probably by MessageFormatter. |
static void |
message(java.lang.String type_id,
java.lang.String message_id)
The main method for displaying system messages for mn8. |
static void |
message(java.lang.String type_id,
java.lang.String message_id,
java.lang.String optional)
The main method for displaying system messages for mn8. |
static void |
message(java.lang.String type_id,
java.lang.String message_id,
java.lang.String optional,
java.lang.String suplement)
The main method for displaying system messages for mn8. |
static void |
setOutputStream(java.io.PrintStream out)
Permits another output stream (a file output stream as example) to be the
default error output stream. |
protected static void |
sysMessage(java.lang.String message)
|
protected static void |
sysMessage(java.lang.String message,
java.lang.Exception ex)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERBOSE
public static final int VERBOSE
DEBUG
public static final int DEBUG
ERROR
public static final int ERROR
LogManager
public LogManager()
setOutputStream
public static void setOutputStream(java.io.PrintStream out)
- Permits another output stream (a file output stream as example) to be the
default error output stream.
- Parameters:
writer
- The PrintStream
which will become the default error
writter.
getOutputStream
public static java.io.OutputStream getOutputStream()
- Returns the default error output stream .
- Returns:
- The
PrintStream
which is default error output stream.
message
public static void message(java.lang.String type_id,
java.lang.String message_id)
- The main method for displaying system messages for mn8.
- Parameters:
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.
message
public static void message(java.lang.String type_id,
java.lang.String message_id,
java.lang.String optional)
- The main method for displaying system messages for mn8.
- Parameters:
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.
message
public static void message(java.lang.String type_id,
java.lang.String message_id,
java.lang.String optional,
java.lang.String suplement)
- The main method for displaying system messages for mn8.
- Parameters:
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.
message
public static void message(java.lang.String message)
- Prints an message, formated previously probably by MessageFormatter.
- Parameters:
message
- The message to be displayed.
message
public static void message(int severity,
java.lang.String message)
message
public static void message(java.lang.Exception generatorException,
java.lang.String message)
- Prints an message previously formated probably by MessageFormatter.
The generator exception information will be printed depending on the
verbosity level choose by the user -v (--verbose) and -d (--debug).
- Parameters:
generatorException
- The exception who triggered this message.message
- The message to be displayed.
sysMessage
protected static void sysMessage(java.lang.String message)
sysMessage
protected static void sysMessage(java.lang.String message,
java.lang.Exception ex)
isVerbose
protected static boolean isVerbose()
isDebug
protected static boolean isDebug()
"Copyright © 2001 Internet Multicasting Services & media.org. All Rights Reserved."