Expresso 5-5-0

com.jcorporate.expresso.core.logging
Class Log

java.lang.Object
  extended bycom.jcorporate.expresso.core.logging.Log

Deprecated. Since Expresso 4.0

public class Log
extends Object

Log is a generic logging facility that determines what logging mechanisms are available to it & logs a message to those mechanisms. The potential mechanisms are: An Database log, viewable as a web page A servlet log, location dependant on servlet engine Standard output (if all else fails!)

Since:
Expresso 1.0
Version:
$Revision: 1.10 $ $Date: 2003/06/03 06:12:14 $
Author:
Michael Nash

Constructor Summary
Log()
          Deprecated. Constructor
 
Method Summary
static String clear()
          Deprecated. Delete all current database log entries
static void log(Exception e)
          Deprecated. Log an exception
static void log(int newLevel, String msg)
          Deprecated. Log a new message at the given level, if we log at or above this level
static void log(int newLevel, String objectName, String msg)
          Deprecated. Log the given message at the given level, recording the originating object
static void log(int newLevel, String objectName, String msg, String color)
          Deprecated. Log a message from a particular object with a color at the given level
static void log(int newLevel, String objectName, String msg, String color, String uid, String jobNumber)
          Deprecated. Log a message with the username and job number recorded as well
static void log(String msg)
          Deprecated. Log the given message at the level 0 (e.g. always log)
static void log(String objectName, Exception e)
          Deprecated. Log an exception from a particular object
static void log(String objectName, String msg)
          Deprecated. Log the given message at level 0 from the named object
static void log(String objectName, String msg, String color)
          Deprecated. Log the given message from an object at level 0
static void log(String objectName, String msg, String color, String userName, String jobNumber)
          Deprecated. Log a message at level 0
static void setConsoleOutput(boolean newFlag)
          Deprecated. Turn on or off console output of the log
static void setContext(ServletContext newContext)
          Deprecated. Set the servlet context, so we have access to the servlet log
static void setMax(int newMax)
          Deprecated. Set the max size that a log is allowed to reach before it is auto-archived to the old directory
static void tryLog(int newLevel, String objectName, String msg, String color)
          Deprecated. Log a message at a given level with an objectname, message, and color.
static void tryLog(String objectName, Exception e)
          Deprecated. Call to log that does not throw any exception, but writes to standard error if the message cannot be logged correctly
static void tryLog(String objectName, String msg)
          Deprecated. Try to log the given message from the given object at level 0 but don't throw an exception if it doesn't work
static void tryLog(String objectName, String msg, String color)
          Deprecated. Try to log a message at level 0 given the objectname, message, and color.
static void tryLog(String objectName, String msg, String color, String userName, String jobNumber)
          Deprecated. Try to log a message given the object, message, color username and job number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log

public Log()
Deprecated. 
Constructor

Method Detail

clear

public static String clear()
                    throws IOException,
                           DBException
Deprecated. 
Delete all current database log entries

Returns:
String: Filename of the copy made of the existing log
Throws:
IOException - If the file cannot be copied
DBException - If the setup info cannot be read

log

public static void log(int newLevel,
                       String msg)
                throws LogException
Deprecated. 
Log a new message at the given level, if we log at or above this level

Parameters:
newLevel - Log level
msg - Message to log
Throws:
LogException

log

public static void log(int newLevel,
                       String objectName,
                       String msg)
                throws LogException
Deprecated. 
Log the given message at the given level, recording the originating object

Parameters:
newLevel - Logging level of this message
objectName - Calling object
msg - Message to log
Throws:
LogException

log

public static void log(int newLevel,
                       String objectName,
                       String msg,
                       String color)
                throws LogException
Deprecated. 
Log a message from a particular object with a color at the given level

Parameters:
newLevel - Message level to log
objectName - Calling object
msg - Message to log
color - Color to log the message with
Throws:
LogException - if the message cannot be logged

log

public static void log(int newLevel,
                       String objectName,
                       String msg,
                       String color,
                       String uid,
                       String jobNumber)
                throws LogException
Deprecated. 
Log a message with the username and job number recorded as well

Parameters:
newLevel - Level of this message
objectName - Calling object
msg - Message to log
color - Color to log the message
uid - User ID
jobNumber - Job Number
Throws:
LogException

log

public static void log(Exception e)
                throws LogException
Deprecated. 
Log an exception

Parameters:
e - Exception to log
Throws:
LogException - If the log entry cannot be written

log

public static void log(String msg)
                throws LogException
Deprecated. 
Log the given message at the level 0 (e.g. always log)

Parameters:
msg - Message to log
Throws:
LogException

log

public static void log(String objectName,
                       Exception e)
                throws LogException
Deprecated. 
Log an exception from a particular object

Parameters:
objectName - Calling object
e - Exception to log
Throws:
LogException

log

public static void log(String objectName,
                       String msg)
                throws LogException
Deprecated. 
Log the given message at level 0 from the named object

Parameters:
objectName - Calling object
msg - Message to log
Throws:
LogException - if the message cannot be logged

log

public static void log(String objectName,
                       String msg,
                       String color)
                throws LogException
Deprecated. 
Log the given message from an object at level 0

Parameters:
objectName - Calling object
msg - Message to log
color - Color to log the message with
Throws:
LogException - if the message cannot be logged

log

public static void log(String objectName,
                       String msg,
                       String color,
                       String userName,
                       String jobNumber)
                throws LogException
Deprecated. 
Log a message at level 0

Parameters:
objectName - Calling object
msg - Message to log
color - Color to log the message
userName - User Name
jobNumber - Job Number
Throws:
LogException

setConsoleOutput

public static void setConsoleOutput(boolean newFlag)
Deprecated. 
Turn on or off console output of the log

Parameters:
newFlag - True if log messages are echoed to the console as well as other logs, else false

setContext

public static void setContext(ServletContext newContext)
                       throws LogException
Deprecated. 
Set the servlet context, so we have access to the servlet log

Parameters:
newContext - The servlet context to be used to log
Throws:
LogException

setMax

public static void setMax(int newMax)
Deprecated. 
Set the max size that a log is allowed to reach before it is auto-archived to the old directory

Parameters:
newMax - Max size of the new log in records

tryLog

public static void tryLog(int newLevel,
                          String objectName,
                          String msg,
                          String color)
Deprecated. 
Log a message at a given level with an objectname, message, and color. Does not throw exception if message cannot be logged

Parameters:
newLevel -
objectName -
msg -
color -

tryLog

public static void tryLog(String objectName,
                          Exception e)
Deprecated. 
Call to log that does not throw any exception, but writes to standard error if the message cannot be logged correctly

Parameters:
objectName - Name of the object logging the message
e - Exception being logged

tryLog

public static void tryLog(String objectName,
                          String msg)
Deprecated. 
Try to log the given message from the given object at level 0 but don't throw an exception if it doesn't work

Parameters:
objectName -
msg -

tryLog

public static void tryLog(String objectName,
                          String msg,
                          String color)
Deprecated. 
Try to log a message at level 0 given the objectname, message, and color. No exception if unable to be logged.

Parameters:
objectName -
msg -
color -

tryLog

public static void tryLog(String objectName,
                          String msg,
                          String color,
                          String userName,
                          String jobNumber)
Deprecated. 
Try to log a message given the object, message, color username and job number. No exception if message cannot be logged

Parameters:
objectName -
msg -
color -
userName -
jobNumber -

Expresso 5-5-0

Please see www.jcorporate.com for information about new Expresso releases.