|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.commons.io.log.LogResource
public class LogResource
Simple Logger to log data to a file
Field Summary | |
---|---|
static long |
MAX_FILE_SIZE
maximal file size of for a log file |
static int |
MAX_FILES
maximal count of files (history of files) |
Fields inherited from interface railo.commons.io.log.Log |
---|
LEVEL_DEBUG, LEVEL_ERROR, LEVEL_FATAL, LEVEL_INFO, LEVEL_WARN |
Constructor Summary | |
---|---|
LogResource(Resource res,
int logLevel,
String charset)
Constructor of the Logger |
|
LogResource(Resource res,
long maxFileSize,
int maxFiles,
int logLevel,
String charset)
Constructor of the Logger |
|
LogResource(Resource res,
long maxFileSize,
int logLevel,
String charset)
Constructor of the Logger |
Method Summary | |
---|---|
void |
debug(String application,
String message)
log level debug |
void |
error(String application,
String message)
log level error |
void |
fatal(String application,
String message)
log level fatal |
int |
getLogLevel()
|
int |
getMaxFiles()
|
long |
getMaxFileSize()
|
Resource |
getResource()
|
void |
info(String application,
String message)
log level info |
void |
log(int level,
String application,
String message)
log one line |
void |
setLogLevel(int level)
|
String |
toString()
|
void |
warn(String application,
String message)
log level warn |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAX_FILES
public static final long MAX_FILE_SIZE
Constructor Detail |
---|
public LogResource(Resource res, int logLevel, String charset) throws IOException
res
- resource to log tologLevel
-
IOException
public LogResource(Resource res, long maxFileSize, int logLevel, String charset) throws IOException
res
- resource to log tomaxFileSize
- max file size if file is greater creates a backup file of the actuell file and creates a new one.logLevel
-
IOException
public LogResource(Resource res, long maxFileSize, int maxFiles, int logLevel, String charset) throws IOException
res
- resource to log tomaxFileSize
- max file size if file is greater creates a backup file of the actuell file and creates a new one.maxFiles
- max count of fileslogLevel
-
IOException
Method Detail |
---|
public void log(int level, String application, String message)
Log
log
in interface Log
level
- level to log (Log.LEVEL_DEBUG, Log.LEVEL_WARN, Log.LEVEL_ERROR)application
- application namemessage
- message to logLog.log(int, java.lang.String, java.lang.String)
public void info(String application, String message)
Log
info
in interface Log
application
- application namemessage
- message to logLog.info(java.lang.String, java.lang.String)
public void debug(String application, String message)
Log
debug
in interface Log
application
- application namemessage
- message to logLog.debug(java.lang.String, java.lang.String)
public void warn(String application, String message)
Log
warn
in interface Log
application
- application namemessage
- message to logLog.warn(java.lang.String, java.lang.String)
public void error(String application, String message)
Log
error
in interface Log
application
- application namemessage
- message to logLog.error(java.lang.String, java.lang.String)
public void fatal(String application, String message)
Log
fatal
in interface Log
application
- application namemessage
- message to logLog.fatal(java.lang.String, java.lang.String)
public Resource getResource()
public int getLogLevel()
getLogLevel
in interface Log
Log.getLogLevel()
public void setLogLevel(int level)
setLogLevel
in interface Log
level
- sets the log level of the logLog.setLogLevel(int)
public String toString()
toString
in class Object
Object.toString()
public long getMaxFileSize()
public int getMaxFiles()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |