All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class VisiModel.VLog

java.lang.Object
   |
   +----VisiModel.VLog

public class VLog
extends Object
The VLog class is used log various message types.

Version:
$Revision: 1.9 $, $Date: 2000/10/12 14:09:18 $
Author:
Mike Spengler, Joseph Thomas

Variable Index

 o ALL
 o DEBUG1
 o DEBUG2
 o DEBUG3
 o DISCOVERY
 o ERR
 o INFO
 o loglevel
 o logLevelMap
 o NONE
VLog message type
 o QUEUE
 o SNMP
 o WARN

Constructor Index

 o VLog()

Method Index

 o getDate(StringBuffer)
Returns a date StringBuffer while trapping for exceptions
 o getDate(StringBuffer, long)
Returns a date StringBuffer while trapping for exceptions
 o getLogLevel()
Return the current log level.
 o getMappings()
Returns the mapping table.
 o getTypeString(int)
Returns a String representing the log level this message is being printed at.
 o log(int, String)
Log a message.
 o setLogLevel(int)
Sets the log level.

Variables

 o NONE
 public static final int NONE
VLog message type

 o ERR
 public static final int ERR
 o WARN
 public static final int WARN
 o INFO
 public static final int INFO
 o DEBUG1
 public static final int DEBUG1
 o DEBUG2
 public static final int DEBUG2
 o DEBUG3
 public static final int DEBUG3
 o SNMP
 public static final int SNMP
 o DISCOVERY
 public static final int DISCOVERY
 o QUEUE
 public static final int QUEUE
 o ALL
 public static final int ALL
 o logLevelMap
 private static final Object logLevelMap[][]
 o loglevel
 private static int loglevel

Constructors

 o VLog
 public VLog()

Methods

 o log
 public static void log(int type,
                        String msg)
Log a message.

Parameters:
type - the message type
msg - the message to be logged
 o getLogLevel
 public static int getLogLevel()
Return the current log level.

Returns:
current log level
 o setLogLevel
 public static void setLogLevel(int level)
Sets the log level.

Parameters:
level - the new log level
 o getMappings
 public static Object[][] getMappings()
Returns the mapping table.

Returns:
mapping table mapping name to loglevel
 o getTypeString
 private static String getTypeString(int type)
Returns a String representing the log level this message is being printed at.

Parameters:
type - what level VLog was called with
Returns:
a String representation of the level
 o getDate
 public static void getDate(StringBuffer desc)
Returns a date StringBuffer while trapping for exceptions

Parameters:
desc - StringBuffer to place formated Date in
Returns:
StringBuffer updated with either the date or empty string
 o getDate
 public static void getDate(StringBuffer desc,
                            long time)
Returns a date StringBuffer while trapping for exceptions

Parameters:
desc - StringBuffer to place formated Date in
time - milliseconds since Jan 1, 1970
Returns:
StringBuffer with either the date or empty string

All Packages  Class Hierarchy  This Package  Previous  Next  Index