|
andyLib v0.9.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.andynaz.log.Logger
it.andynaz.log.FileLogger
public class FileLogger
File Logger. Writes the logs on a text file.
Each constructor calls the corresponding constructor of the Logger
class, so the FileLogger object inherits all the properties the Logger class
has (and uses all of its options).
Field Summary | |
---|---|
protected File |
logFile
File in which write the logs. |
Fields inherited from class it.andynaz.log.Logger |
---|
dateFormat, level, name, separator, useDate, useLevel |
Constructor Summary | |
---|---|
FileLogger()
Creates a FileLogger. |
|
FileLogger(Properties props)
Creates a FileLogger with a configuration. |
|
FileLogger(String name)
Creates a FileLogger with a name. |
|
FileLogger(String name,
Properties props)
Creates a FileLogger with a name and a configuration. |
Method Summary | |
---|---|
void |
log(Exception e,
Level level)
Writes the log of an exception with a specificied level. |
void |
log(String log,
Level level)
Writes the log. |
Methods inherited from class it.andynaz.log.Logger |
---|
getDate, getPrefix, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected File logFile
Constructor Detail |
---|
public FileLogger(String name, Properties props)
log.fileLogger.file
".
name
- name of the Loggerprops
- configuration of the Loggerfor all the other properties see
the Logger constructor
public FileLogger(String name)
ConfigMgr.getConfigParams()
method).
name
- name of the LoggerFileLogger(String, Properties)
public FileLogger(Properties props)
props
- configuration of the LoggerFileLogger(String, Properties)
public FileLogger()
FileLogger(String, Properties)
Method Detail |
---|
public void log(String log, Level level)
Logger.log(String, Level)
method.
log
in class Logger
log
- log to be writtenlevel
- log levelpublic void log(Exception e, Level level)
If it is not possible, invokes the Logger.log(Exception, Level)
method.
log
in class Logger
e
- exception to be loggedlevel
- log level
|
andyLib v0.9.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |