02/28/2005
 

com.epicentric.common
Class Log

java.lang.Object
  |
  +--com.epicentric.common.Log
All Implemented Interfaces:
LogConstants

Deprecated. as of version 4.5, to be removed in 8.0 or later. Logging functionality has been moved to the package com.vignette.portal.log.

public class Log
extends Object
implements LogConstants

Maintains and provides the interface to a single instance of the logging object, so that all callers are writing to a single log.


Field Summary
protected static LogInterface instance
          Deprecated.  
 
Fields inherited from interface com.epicentric.common.LogConstants
kCritical, kDebug, kDefault, kDevDebug, kDoNotOverrideFileInstruction, kError, kFileLogging, kNoFileLogging, kNone, kStatus, kUndefined, kWarning
 
Method Summary
static void debugMessage(boolean debug, String msg)
          Deprecated. If debug == true, logs msg as kDevDebug.
static void debugMessage(boolean debug, Throwable thrown, String msg)
          Deprecated. If debug == true, logs msg, thrown, and the stack trace as kDevDebug.
static void errorMessage(String msg)
          Deprecated. Logs the given message as kError.
static void errorMessage(Throwable thrown)
          Deprecated. Logs the given exception and stack trace as kError.
static void forceFileLogging()
          Deprecated. Begins a log file if one is not already in place.
static LogInterface getLog()
          Deprecated. Returns the underlying logging object.
static String getLogFileContents()
          Deprecated. Returns the last few hundred lines of the log file.
static int getLogFileContents(int start, int count, StringBuffer buffer)
          Deprecated. Returns a page full of log entries.
static int getSize()
          Deprecated. Get the line count of the log file.
static void initClass()
          Deprecated. Initializes Vignette Portal logging, using the default Vignette Portal properties file and log banner ("## Vignette Portal log started").
static void initClass(Properties props, String[] logBanner)
          Deprecated. Supports the use of Vignette Portal Log classes outside of Vignette Portal.
static boolean isLoaded()
          Deprecated. Determines whether the logging object is loaded.
static void message(int type, Object msg)
          Deprecated. Logs the given message at the given log level.
static void message(int type, Throwable thrown, String msg)
          Deprecated. Logs the given message, given exception, and the stack trace at the given log level.
static void message(String msg)
          Deprecated. as of 4.0, to be removed in 8.0 or later. Instead, use Log.message(int, java.lang.Object) with the explicit log level.
static void message(Throwable thrown, String msg)
          Deprecated. Logs the given message, given exception, and the stack trace at log level kError.
static void rolloverLogFile()
          Deprecated. Explicitly rolls over the file log (that is, starts logging to a new file).
static void setTrace(boolean b)
          Deprecated. Turns logging of exception stack traces on or off.
static void setUseDateTimestamp(boolean useDateTimeStamp)
          Deprecated. Sets whether all messages are preceded by a date and time stamp.
static void suppressFileLogging()
          Deprecated. Suppresses logging to a file.
static boolean usingDateTimestamp()
          Deprecated. Checks whether logging is using the date and time stamp.
static boolean willLogAtLevel(int level)
          Deprecated. Checks whether a message at a particular level will be logged.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

protected static LogInterface instance
Deprecated. 
Method Detail

initClass

public static void initClass(Properties props,
                             String[] logBanner)
Deprecated. 
Supports the use of Vignette Portal Log classes outside of Vignette Portal. A developer can supply a custom Properties object rather than using the default Vignette Portal properties file. In addition, a log banner can be specified. This will show up at the beginning of each log.
Parameters:
props - A properties object containing the standard FileLog properties.
logBanner - The banner to be printed at the beginning of each log file/stream. Multiple banner lines can be supplied here (hence the[]).

initClass

public static void initClass()
Deprecated. 
Initializes Vignette Portal logging, using the default Vignette Portal properties file and log banner ("## Vignette Portal log started").

forceFileLogging

public static void forceFileLogging()
Deprecated. 
Begins a log file if one is not already in place.

suppressFileLogging

public static void suppressFileLogging()
Deprecated. 
Suppresses logging to a file.

rolloverLogFile

public static void rolloverLogFile()
Deprecated. 
Explicitly rolls over the file log (that is, starts logging to a new file).

getLogFileContents

public static int getLogFileContents(int start,
                                     int count,
                                     StringBuffer buffer)
Deprecated. 
Returns a page full of log entries.
Parameters:
start - 0-based start point
count - Lines to see
buffer - Target for the content
Returns:
Total lines available between start and count

getLogFileContents

public static String getLogFileContents()
Deprecated. 
Returns the last few hundred lines of the log file.

getSize

public static int getSize()
Deprecated. 
Get the line count of the log file. Remember you could have more than one file appenders, and this method will only return the line count of the first fiel appender.

willLogAtLevel

public static boolean willLogAtLevel(int level)
Deprecated. 
Checks whether a message at a particular level will be logged.
Parameters:
level - Logging level to test
Returns:
true if a message at level will be logged

message

public static void message(int type,
                           Object msg)
Deprecated. 
Logs the given message at the given log level.
Parameters:
type - Integer constant identifying the message level
msg - Message object (String, array, hash table, etc.)
See Also:
LogConstants

message

public static void message(String msg)
Deprecated. as of 4.0, to be removed in 8.0 or later. Instead, use Log.message(int, java.lang.Object) with the explicit log level.

Logs the given message at log level kStatus.
See Also:
LogConstants.kStatus, Log.message(int, java.lang.Object)

message

public static void message(Throwable thrown,
                           String msg)
Deprecated. 
Logs the given message, given exception, and the stack trace at log level kError.
Parameters:
thrown - Exception class name
msg - Message string
See Also:
LogConstants.kError

message

public static void message(int type,
                           Throwable thrown,
                           String msg)
Deprecated. 
Logs the given message, given exception, and the stack trace at the given log level.
Parameters:
type - Integer constant identifying the message level
thrown - Exception class name
msg - Message string

debugMessage

public static void debugMessage(boolean debug,
                                String msg)
Deprecated. 
If debug == true, logs msg as kDevDebug.
See Also:
LogConstants.kDevDebug

debugMessage

public static void debugMessage(boolean debug,
                                Throwable thrown,
                                String msg)
Deprecated. 
If debug == true, logs msg, thrown, and the stack trace as kDevDebug.
See Also:
LogConstants.kDevDebug

errorMessage

public static void errorMessage(Throwable thrown)
Deprecated. 
Logs the given exception and stack trace as kError.
See Also:
LogConstants.kError

errorMessage

public static void errorMessage(String msg)
Deprecated. 
Logs the given message as kError.
See Also:
LogConstants.kError

setTrace

public static void setTrace(boolean b)
Deprecated. 
Turns logging of exception stack traces on or off.

setUseDateTimestamp

public static void setUseDateTimestamp(boolean useDateTimeStamp)
Deprecated. 
Sets whether all messages are preceded by a date and time stamp.

usingDateTimestamp

public static boolean usingDateTimestamp()
Deprecated. 
Checks whether logging is using the date and time stamp.
Returns:
true if date/time stamp is being used, false otherwise

getLog

public static LogInterface getLog()
Deprecated. 
Returns the underlying logging object.

isLoaded

public static boolean isLoaded()
Deprecated. 
Determines whether the logging object is loaded.

02/28/2005
 

Copyright and Trademark Notices