VANET Simulator
 All Classes Functions Variables
Static Public Member Functions | List of all members
vanetsim.ErrorLog Class Reference

Static Public Member Functions

static void setParameters (int level, String dir, String format)
static synchronized void log (String message, int severity, String errClass, String errMethod, Exception e)
static void deleteOld (long loggerTrashtime, String loggerDir)

Detailed Description

Helper Class for error logging.

Member Function Documentation

static void vanetsim.ErrorLog.deleteOld ( long  loggerTrashtime,
String  loggerDir 

Deletes old logfiles (uses file modification time to determine which files are old)

loggerTrashtimemaximum age (in days) for a log file. Older files are deleted.
loggerDirdirectory where to delete files
static synchronized void vanetsim.ErrorLog.log ( String  message,
int  severity,
String  errClass,
String  errMethod,
Exception  e 

Logs an error.

messageerror message
severityerror severity in scale of 1-7. A higher value stands for a more severe error (Finest, Finer, Fine, Config, Info, Warning, Severe)
errClassclass where the error occured
errMethodmethod in which the error occured
ethe exception (use null if you don't have one)
static void vanetsim.ErrorLog.setParameters ( int  level,
String  dir,
String  format 

Sets the parameters for the static class.

levelthe minimum level for error messages. If the severity of an error is lower than this value, nothing is logged.
dirthe directory where the error log files are located
formatthe format of the log files (txt or xml)

The documentation for this class was generated from the following file: