|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Logger
An interface to loggers.
Field Summary |
---|
Fields inherited from interface org.norther.tammi.acorn.locale.Localizer |
---|
ANY_NAME |
Method Summary | |
---|---|
void |
addAppender(Object log,
Object appender)
Adds a new appender for the specified logger. |
void |
addFilter(String className)
Adds an exception filter. |
void |
clearAppenders(Object log)
Clears appenders of the specified logger. |
void |
clearFilters()
Clears all exception filters. |
void |
flush()
Flushes queued log entries. |
boolean |
getAdditivity(Object log)
Gets the additivity of the specified logger. |
String[] |
getAppenderNames(Object log)
Gets appender names of the specified logger. |
int |
getBufferSize()
Gets the log buffer size. |
String[] |
getFilters()
Gets exception filters. |
Log.Level |
getLevel()
Gets the root level. |
Log.Level |
getLevel(Object log)
Gets the level of the specified logger. |
String |
getLocalizedMessage(Object msg)
Gets a localized message for the default locale. |
String |
getLocalizedMessage(Object msg,
Locale locale)
Gets a localized message for the specified locale. |
String |
getLogClassName()
Gets the log implementation class name. |
LogEntry.Encoding |
getLogEntryEncoding()
Gets the log entry encoding. |
String |
getLoggerClassName()
Gets the logger implementation class name. |
String |
getLoggerName(Log.Level level)
Gets the logger name for the specified level. |
int |
getPollingInterval()
Gets the interval of polling new enries for logging. |
String |
getTimeZoneId()
Gets the default time zone. |
boolean |
isDefaultLogFactory()
Checks whether a default log factory. |
boolean |
isLogEnabled(Log.Level level)
Checks the specified level. |
boolean |
isLogEnabled(Object log,
Log.Level level)
Checks the specified level and logger. |
boolean |
isStackTrace()
Gets the stack trace flag for all categories called through this logger instance. |
boolean |
isStaticTrace()
Gets the trace flag for the static trace methods. |
boolean |
isSystemErrLogged()
Checks if system err is to be logged by this logger. |
boolean |
isSystemOutLogged()
Checks if system out is to be logged by this logger. |
void |
log(Log.Level level,
long time,
String msg,
Object arg)
Logs a message with a specific level, date and argument. |
void |
log(Log.Level level,
long time,
String msg,
Object arg,
Throwable cause)
Logs a message with a specific level, date, argument and reason. |
void |
log(Log.Level level,
Object msg)
Logs a message with a specific level. |
void |
log(Log.Level level,
String msg,
Object arg)
Logs a message with a specific level and argument. |
void |
log(Log.Level level,
String msg,
Object arg,
Throwable cause)
Logs a message with a specific level, argument and reason. |
void |
log(Object log,
Log.Level level,
long time,
String msg,
Object arg)
Logs a message with a specific logger, level, date and argument. |
void |
log(Object log,
Log.Level level,
long time,
String msg,
Object arg,
Throwable cause)
Logs a message with a specific logger, level, date, argument and reason. |
void |
log(Object log,
Log.Level level,
Object msg)
Logs a message with a specific logger and level. |
void |
log(Object log,
Log.Level level,
String msg,
Object arg)
Logs a message with a specific logger, level and argument. |
void |
log(Object log,
Log.Level level,
String msg,
Object arg,
Throwable cause)
Logs a message with a specific logger, level, argument and reason. |
void |
release()
Releases cached log instances. |
void |
removeAppender(Object log,
String name)
Removes an appender from the specified logger. |
void |
removeFilter(String className)
Removes an exception filter. |
void |
setAdditivity(Object log,
boolean additivity)
Sets the additivity of the specified logger. |
void |
setBufferSize(int size)
Sets the log buffer size. |
void |
setDefaultLogFactory(boolean flag)
Sets whether a default log factory. |
void |
setFilters(String[] filters)
Sets exception filters. |
void |
setLevel(Log.Level level)
Sets the root level. |
void |
setLevel(Object log,
Log.Level level)
Sets the level of the specified logger. |
void |
setLevelAsString(Object log,
String level)
Sets the level of the specified logger as a string. |
void |
setLevelAsString(String level)
Sets the root level as a string. |
void |
setLogClassName(String className)
Sets the log implementation class name. |
void |
setLogEntryEncoding(LogEntry.Encoding enc)
Sets the log entry encoding. |
void |
setLoggerName(Log.Level level,
String name)
Sets the logger name for the specified level. |
void |
setPollingInterval(int msecs)
Sets the interval of polling new enries for logging. |
void |
setStackTrace(boolean flag)
Sets the stack trace flag for all categories called through this logger instance. |
void |
setStaticTrace(boolean flag)
Sets the trace flag for static trace methods. |
void |
setSystemErrLogged(boolean flag)
Sets if system err if to be logged by this logger. |
void |
setSystemOutLogged(boolean flag)
Sets if system out is to be logged by this logger. |
void |
setTimeZoneId(String zone)
Sets the default time zone. |
Methods inherited from interface org.norther.tammi.core.base.ObjectFactory |
---|
getInstance, getInstance, getInstance, getInstance, isLoaderSupported |
Methods inherited from interface org.norther.tammi.core.config.Configurable |
---|
addProperty, addProperty, addPropertyFilePath, addPropertyFilePath, clearProperties, containsProperty, getConfigKey, getProperties, getProperty, getPropertyFilePath, getPropertyFilePaths, indexOfProperty, propertyMap, propertyMap, removeProperty, removeProperty, removePropertyFilePath, setConfigKey, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, setPropertyFilePaths, setPropertyFilePaths, storeProperties |
Methods inherited from interface org.norther.tammi.core.locale.ResourceMap |
---|
addResourceBundleName, addResourceBundleNames, clearResourceBundleNames, clearResourceBundleNames, getDefaultBaseName, getFallbackResourcesName, getPlugInBaseName, getResourceBundleNames, getResourceFinderName, qualifierSet, removeResourceBundleName, resolveResourceBundle, resolveResourceBundleName, setDefaultBaseName, setFallbackResourcesName, setResourceBundleName, setResourceBundleNames, setResourceFinderName |
Methods inherited from interface org.norther.tammi.acorn.locale.Localizer |
---|
resolveLocalizedObject, resolveLocalizedResource, resolveLocalizedString, resolveLocalizedStrings |
Methods inherited from interface org.norther.tammi.core.cache.CacheClient |
---|
clearCached, expireCached, expireFraction, getCache, getSharedCacheName, isCachingDisabled, removeCache, setCachingDisabled, setSharedCacheName |
Methods inherited from interface org.norther.tammi.core.base.Refreshable |
---|
getRefreshed, refresh |
Method Detail |
---|
boolean isStaticTrace()
void setStaticTrace(boolean flag)
flag
- the static trace on/off flag.boolean isStackTrace()
void setStackTrace(boolean flag)
flag
- the stack trace on/off flag.int getBufferSize()
void setBufferSize(int size)
size
- the buffer size as a number of log entries.int getPollingInterval()
void setPollingInterval(int msecs)
msecs
- the polling interval in msecs.String getTimeZoneId()
void setTimeZoneId(String zone)
zone
- the default time zone of log entries.LogEntry.Encoding getLogEntryEncoding()
void setLogEntryEncoding(LogEntry.Encoding enc)
enc
- the log entry encoding.boolean isDefaultLogFactory()
void setDefaultLogFactory(boolean flag)
flag
- true if a default factory, false otherwise.String getLoggerClassName()
String getLogClassName()
void setLogClassName(String className)
className
- the log class name.String getLoggerName(Log.Level level)
level
- the level.
void setLoggerName(Log.Level level, String name)
level
- the level.name
- the logger name.boolean isLogEnabled(Log.Level level)
level
- the level.
Log.Level getLevel()
void setLevel(Log.Level level)
level
- the level.void setLevelAsString(String level)
level
- the level as a string.boolean isLogEnabled(Object log, Log.Level level)
log
- the logger.level
- the level.
Log.Level getLevel(Object log)
log
- the logger.
void setLevel(Object log, Log.Level level)
log
- the logger.level
- the level.void setLevelAsString(Object log, String level)
log
- the logger.level
- the level as a string.boolean getAdditivity(Object log)
log
- the logger.
void setAdditivity(Object log, boolean additivity)
log
- the logger.additivity
- the additivity.void addAppender(Object log, Object appender)
log
- the logger.appender
- the appender class name.String[] getAppenderNames(Object log)
log
- the logger.
void removeAppender(Object log, String name)
log
- the logger.name
- the appender name.void clearAppenders(Object log)
log
- the logger.String[] getFilters()
void setFilters(String[] filters)
filters
- an array of exception filters.void addFilter(String className)
className
- the class name of a filtered exception.void removeFilter(String className)
className
- the class name of a filtered exception.void clearFilters()
void log(Log.Level level, Object msg)
level
- the level of the message.msg
- the message to log.void log(Log.Level level, String msg, Object arg)
level
- the level of the message.msg
- the message to log.arg
- the argument or cause.void log(Log.Level level, String msg, Object arg, Throwable cause)
level
- the level of the message.msg
- the message to log.arg
- the argument.cause
- the cause.void log(Log.Level level, long time, String msg, Object arg)
level
- the level of the message.time
- the time of the event.msg
- the message to log.arg
- the argument or cause.void log(Log.Level level, long time, String msg, Object arg, Throwable cause)
level
- the level of the message.time
- the time of the event.msg
- the message to log.arg
- the argument.cause
- the cause.void log(Object log, Log.Level level, Object msg)
log
- the logger.level
- the level of the message.msg
- the message to log.void log(Object log, Log.Level level, String msg, Object arg)
log
- the logger.level
- the level of the message.msg
- the message to log.arg
- the argument or cause.void log(Object log, Log.Level level, String msg, Object arg, Throwable cause)
log
- the logger.level
- the level of the message.msg
- the message to log.arg
- the argument.cause
- the cause.void log(Object log, Log.Level level, long time, String msg, Object arg)
log
- the logger.level
- the level of the message.time
- the time of the event.msg
- the message to log.arg
- the argument or cause.void log(Object log, Log.Level level, long time, String msg, Object arg, Throwable cause)
log
- the logger.level
- the level of the message.time
- the time of the event.msg
- the message to log.arg
- the argument.cause
- the cause.boolean isSystemOutLogged()
void setSystemOutLogged(boolean flag)
flag
- true if logged, false otherwise,boolean isSystemErrLogged()
void setSystemErrLogged(boolean flag)
Note that echo will be automatically off.
flag
- true if logged, false otherwise,String getLocalizedMessage(Object msg)
msg
- the message to localize.
String getLocalizedMessage(Object msg, Locale locale)
msg
- the message to localize.locale
- the locale to apply.
void flush()
void release()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |