Framework Professional Edition Package


com.prosyst.util.ref
Interface LogInterface

All Known Implementing Classes:
Log, ManagedLog

public interface LogInterface

Author:
Dobrin Ivanov

Field Summary
static boolean debug
           
static boolean printOnConsole
           
 
Method Summary
 void close()
          Releases the Log's resources: ungets LogService, removes the ServiceListener from the framework and nulls references.
 void debug(java.lang.String str, java.lang.Throwable e)
          Logs debug information if debug flag is true.
 void error(java.lang.String str, java.lang.Throwable ex)
          Logs error messages.
 boolean getDebug()
          Gets the flag, which enables logging debug messages.
 boolean getPrintOnConsole()
          Gets the flag, which enables printing log messages on the console.
 void info(java.lang.String str)
          Logs info messages.
 void setDebug(boolean value)
          enable/diasable loging of debug info
 void setPrintOnConsole(boolean value)
          enable/diasable print on console
 void warning(java.lang.String str, java.lang.Throwable ex)
          Logs warning messages.
 

Field Detail

printOnConsole

static final boolean printOnConsole
See Also:
Constant Field Values

debug

static final boolean debug
See Also:
Constant Field Values
Method Detail

error

void error(java.lang.String str,
           java.lang.Throwable ex)
Logs error messages. If printOnConsole is true, or if the LogService is unavailable, log info is printed on console.

Parameters:
str - Message description of the error.
ex - Throwable object, containing the stack trace; may be null.

warning

void warning(java.lang.String str,
             java.lang.Throwable ex)
Logs warning messages. If printOnConsole is true, or if the LogService is unavailable, log info is printed on console.

Parameters:
str - Message description of the error.
ex - Throwable object, containing the stack trace; may be null.

info

void info(java.lang.String str)
Logs info messages. If printOnConsole is true, or if the LogService is unavailable, message is printed on console.

Parameters:
str - Message to be logged.

debug

void debug(java.lang.String str,
           java.lang.Throwable e)
Logs debug information if debug flag is true. If LogService is unaccessible or printOnConsole flag is true, log info is printed on console.

Parameters:
str - Message description.
e - Throwable object, containing the stack trace; may be null.

close

void close()
Releases the Log's resources: ungets LogService, removes the ServiceListener from the framework and nulls references. After invocation of this method, this Log object can be used no longer.


setPrintOnConsole

void setPrintOnConsole(boolean value)
enable/diasable print on console

Parameters:
value - boolean if true enables print on console else disables it

setDebug

void setDebug(boolean value)
enable/diasable loging of debug info

Parameters:
value - boolean if true enables loging of debug info else disables it

getDebug

boolean getDebug()
Gets the flag, which enables logging debug messages.

Returns:
true if debugging is enabled

getPrintOnConsole

boolean getPrintOnConsole()
Gets the flag, which enables printing log messages on the console.

Returns:
true if printingon console is enabled

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved