|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vanetsim.ErrorLog
public final class ErrorLog
Helper Class for error logging.
Constructor Summary | |
---|---|
ErrorLog()
|
Method Summary | |
---|---|
static void |
deleteOld(long loggerTrashtime,
java.lang.String loggerDir)
Deletes old logfiles (uses file modification time to determine which files are old) |
static void |
log(java.lang.String message,
int severity,
java.lang.String errClass,
java.lang.String errMethod,
java.lang.Exception e)
Logs an error. |
static void |
setParameters(int level,
java.lang.String dir,
java.lang.String format)
Sets the parameters for the static class. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ErrorLog()
Method Detail |
---|
public static void setParameters(int level, java.lang.String dir, java.lang.String format)
level
- the minimum level for error messages. If the severity of an error is lower than this value, nothing is logged.dir
- the directory where the error log files are locatedformat
- the format of the log files (txt
or xml
)public static void log(java.lang.String message, int severity, java.lang.String errClass, java.lang.String errMethod, java.lang.Exception e)
message
- error messageseverity
- error severity in scale of 1-7. A higher value stands for a more severe error (Finest, Finer, Fine, Config, Info, Warning, Severe)errClass
- class where the error occurederrMethod
- method in which the error occurede
- the exception (use null
if you don't have one)public static void deleteOld(long loggerTrashtime, java.lang.String loggerDir)
loggerTrashtime
- maximum age (in days) for a log file. Older files are deleted.loggerDir
- directory where to delete files
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |