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
-
ALL
-
-
DEBUG1
-
-
DEBUG2
-
-
DEBUG3
-
-
DISCOVERY
-
-
ERR
-
-
INFO
-
-
loglevel
-
-
logLevelMap
-
-
NONE
- VLog message type
-
QUEUE
-
-
SNMP
-
-
WARN
-
-
VLog()
-
-
getDate(StringBuffer)
- Returns a date StringBuffer while trapping for exceptions
-
getDate(StringBuffer, long)
- Returns a date StringBuffer while trapping for exceptions
-
getLogLevel()
- Return the current log level.
-
getMappings()
- Returns the mapping table.
-
getTypeString(int)
- Returns a String representing the log level this message is
being printed at.
-
log(int, String)
- Log a message.
-
setLogLevel(int)
- Sets the log level.
NONE
public static final int NONE
- VLog message type
ERR
public static final int ERR
WARN
public static final int WARN
INFO
public static final int INFO
DEBUG1
public static final int DEBUG1
DEBUG2
public static final int DEBUG2
DEBUG3
public static final int DEBUG3
SNMP
public static final int SNMP
DISCOVERY
public static final int DISCOVERY
QUEUE
public static final int QUEUE
ALL
public static final int ALL
logLevelMap
private static final Object logLevelMap[][]
loglevel
private static int loglevel
VLog
public VLog()
log
public static void log(int type,
String msg)
- Log a message.
- Parameters:
- type - the message type
- msg - the message to be logged
getLogLevel
public static int getLogLevel()
- Return the current log level.
- Returns:
- current log level
setLogLevel
public static void setLogLevel(int level)
- Sets the log level.
- Parameters:
- level - the new log level
getMappings
public static Object[][] getMappings()
- Returns the mapping table.
- Returns:
- mapping table mapping name to loglevel
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
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
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