org.media.mn8
Class LogManager

java.lang.Object
  |
  +--org.media.mn8.LogManager

public class LogManager
extends 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

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

VERBOSE

public static final int VERBOSE
See Also:
Constant Field Values

DEBUG

public static final int DEBUG
See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values
Constructor Detail

LogManager

public LogManager()
Method Detail

setOutputStream

public static void setOutputStream(PrintStream out)
Permits another output stream (a file output stream as example) to be the default error output stream.


getOutputStream

public static OutputStream getOutputStream()
Returns the default error output stream .

Returns:
The PrintStream which is default error output stream.

message

public static void message(String type_id,
                           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(String type_id,
                           String message_id,
                           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(String type_id,
                           String message_id,
                           String optional,
                           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(String message)
Prints an message, formated previously probably by MessageFormatter.

Parameters:
message - The message to be displayed.

message

public static void message(int severity,
                           String message)

message

public static void message(Exception generatorException,
                           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(String message)

sysMessage

protected static void sysMessage(String message,
                                 Exception ex)

isVerbose

protected static boolean isVerbose()

isDebug

protected static boolean isDebug()


"Copyright © 2000-2002 Internet Multicasting Services, media.org & noLimits Technologies. All Rights Reserved."