|
JBoss Log Manager 1.5.5.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.logging.Logger
org.jboss.logmanager.Logger
public final class Logger
An actual logger instance. This is the end-user interface into the logging system.
| Nested Class Summary | |
|---|---|
static class |
Logger.AttachmentKey<V>
An attachment key instance. |
| Field Summary |
|---|
| Fields inherited from class java.util.logging.Logger |
|---|
global, GLOBAL_LOGGER_NAME |
| Method Summary | ||
|---|---|---|
void |
addHandler(Handler handler)
|
|
|
attach(Logger.AttachmentKey<V> key,
V value)
Attach an object to this logger under a given key. |
|
|
attachIfAbsent(Logger.AttachmentKey<V> key,
V value)
Attach an object to this logger under a given key, if such an attachment does not already exist. |
|
Handler[] |
clearHandlers()
A convenience method to atomically get and clear all handlers. |
|
boolean |
compareAndSetHandlers(Handler[] expected,
Handler[] newHandlers)
Atomically compare and set the handler list for this logger. |
|
void |
config(String msg)
|
|
|
detach(Logger.AttachmentKey<V> key)
Remove an attachment. |
|
void |
entering(String sourceClass,
String sourceMethod)
|
|
void |
entering(String sourceClass,
String sourceMethod,
Object param1)
|
|
void |
entering(String sourceClass,
String sourceMethod,
Object[] params)
|
|
void |
exiting(String sourceClass,
String sourceMethod)
|
|
void |
exiting(String sourceClass,
String sourceMethod,
Object result)
|
|
protected void |
finalize()
|
|
void |
fine(String msg)
|
|
void |
finer(String msg)
|
|
void |
finest(String msg)
|
|
Handler[] |
getAndSetHandlers(Handler[] handlers)
Atomically get and set the handler list for this logger. |
|
|
getAttachment(Logger.AttachmentKey<V> key)
Get the attachment value for a given key, or null if there is no such attachment. |
|
int |
getEffectiveLevel()
Get the effective numerical log level, inherited from the parent. |
|
Filter |
getFilter()
|
|
Handler[] |
getHandlers()
|
|
Level |
getLevel()
|
|
LogContext |
getLogContext()
Get the log context to which this logger belongs. |
|
static Logger |
getLogger(String name)
Static logger factory method which returns a JBoss LogManager logger. |
|
static Logger |
getLogger(String name,
String bundleName)
Static logger factory method which returns a JBoss LogManager logger. |
|
Logger |
getParent()
|
|
boolean |
getUseParentHandlers()
|
|
void |
info(String msg)
|
|
boolean |
isLoggable(Level level)
|
|
void |
log(Level level,
String msg)
|
|
void |
log(Level level,
String msg,
Object param1)
|
|
void |
log(Level level,
String msg,
Object[] params)
|
|
void |
log(Level level,
String msg,
Throwable thrown)
|
|
void |
log(LogRecord record)
|
|
void |
log(String fqcn,
Level level,
String message,
ExtLogRecord.FormatStyle style,
Object[] params,
Throwable t)
SPI interface method to log a message at a given level. |
|
void |
log(String fqcn,
Level level,
String message,
String bundleName,
ExtLogRecord.FormatStyle style,
Object[] params,
Throwable t)
SPI interface method to log a message at a given level, with a specific resource bundle. |
|
void |
log(String fqcn,
Level level,
String message,
Throwable t)
SPI interface method to log a message at a given level. |
|
void |
logp(Level level,
String sourceClass,
String sourceMethod,
String msg)
|
|
void |
logp(Level level,
String sourceClass,
String sourceMethod,
String msg,
Object param1)
|
|
void |
logp(Level level,
String sourceClass,
String sourceMethod,
String msg,
Object[] params)
|
|
void |
logp(Level level,
String sourceClass,
String sourceMethod,
String msg,
Throwable thrown)
|
|
void |
logRaw(ExtLogRecord record)
Do the logging with no level checks (they've already been done). |
|
void |
logRaw(LogRecord record)
Do the logging with no level checks (they've already been done). |
|
void |
logrb(Level level,
String sourceClass,
String sourceMethod,
String bundleName,
String msg)
|
|
void |
logrb(Level level,
String sourceClass,
String sourceMethod,
String bundleName,
String msg,
Object param1)
|
|
void |
logrb(Level level,
String sourceClass,
String sourceMethod,
String bundleName,
String msg,
Object[] params)
|
|
void |
logrb(Level level,
String sourceClass,
String sourceMethod,
String bundleName,
String msg,
Throwable thrown)
|
|
void |
removeHandler(Handler handler)
|
|
void |
setFilter(Filter filter)
|
|
void |
setHandlers(Handler[] handlers)
A convenience method to atomically replace the handler list for this logger. |
|
void |
setLevel(Level newLevel)
This implementation grabs a lock, so that only one thread may update the log level of any logger at a time, in order to allow readers to never block (though there is a window where retrieving the log level reflects an older effective level than the actual level). |
|
void |
setLevelName(String newLevelName)
Set the log level by name. |
|
void |
setParent(Logger parent)
Not allowed. This method may never be called. |
|
void |
setUseParentHandlers(boolean useParentHandlers)
|
|
void |
severe(String msg)
|
|
void |
throwing(String sourceClass,
String sourceMethod,
Throwable thrown)
|
|
String |
toString()
|
|
void |
warning(String msg)
|
|
protected Object |
writeReplace()
|
|
| Methods inherited from class java.util.logging.Logger |
|---|
getAnonymousLogger, getAnonymousLogger, getName, getResourceBundle, getResourceBundleName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static Logger getLogger(String name)
name - the logger name
public static Logger getLogger(String name,
String bundleName)
name - the logger namebundleName - the bundle name
protected final Object writeReplace()
throws ObjectStreamException
ObjectStreamException
public void setFilter(Filter filter)
throws SecurityException
setFilter in class LoggerSecurityExceptionpublic Filter getFilter()
getFilter in class Logger
public void setLevel(Level newLevel)
throws SecurityException
setLevel in class LoggerSecurityException
public void setLevelName(String newLevelName)
throws SecurityException
setLevel(Level).
newLevelName - the name of the level to set
SecurityException - if a security manager exists and if the caller does not have LoggingPermission("control")public int getEffectiveLevel()
public Level getLevel()
getLevel in class Loggerpublic boolean isLoggable(Level level)
isLoggable in class Loggerpublic <V> V getAttachment(Logger.AttachmentKey<V> key)
null if there is no such attachment.
V - the attachment value typekey - the key
null if there is none for this key
public <V> V attach(Logger.AttachmentKey<V> key,
V value)
throws SecurityException
V - the attachment value typekey - the attachment keyvalue - the attachment value
SecurityException - if a security manager exists and if the caller does not have LoggingPermission(control)
public <V> V attachIfAbsent(Logger.AttachmentKey<V> key,
V value)
throws SecurityException
V - the attachment value typekey - the attachment keyvalue - the attachment value
null if the value was successfully attached
SecurityException - if a security manager exists and if the caller does not have LoggingPermission(control)
public <V> V detach(Logger.AttachmentKey<V> key)
throws SecurityException
V - the attachment value typekey - the attachment key
null if there was none
SecurityException - if a security manager exists and if the caller does not have LoggingPermission(control)
public void addHandler(Handler handler)
throws SecurityException
addHandler in class LoggerSecurityException
public void removeHandler(Handler handler)
throws SecurityException
removeHandler in class LoggerSecurityExceptionpublic Handler[] getHandlers()
getHandlers in class Logger
public void setHandlers(Handler[] handlers)
throws SecurityException
handlers - the new handlers
SecurityException - if a security manager exists and if the caller does not have LoggingPermission(control)
public Handler[] getAndSetHandlers(Handler[] handlers)
throws SecurityException
handlers - the new handler set
SecurityException - if a security manager exists and if the caller does not have LoggingPermission(control)
public boolean compareAndSetHandlers(Handler[] expected,
Handler[] newHandlers)
throws SecurityException
expected - the expected list of handlersnewHandlers - the replacement list of handlers
true if the handler list was updated or false if the current handlers did not match the expected handlers list
SecurityException - if a security manager exists and if the caller does not have LoggingPermission(control)
public Handler[] clearHandlers()
throws SecurityException
SecurityException - if a security manager exists and if the caller does not have LoggingPermission(control)public void setUseParentHandlers(boolean useParentHandlers)
setUseParentHandlers in class Loggerpublic boolean getUseParentHandlers()
getUseParentHandlers in class Loggerpublic Logger getParent()
getParent in class Loggerpublic void setParent(Logger parent)
setParent in class LoggerSecurityException - alwayspublic LogContext getLogContext()
public void log(LogRecord record)
log in class Logger
public void entering(String sourceClass,
String sourceMethod)
entering in class Logger
public void entering(String sourceClass,
String sourceMethod,
Object param1)
entering in class Logger
public void entering(String sourceClass,
String sourceMethod,
Object[] params)
entering in class Logger
public void exiting(String sourceClass,
String sourceMethod)
exiting in class Logger
public void exiting(String sourceClass,
String sourceMethod,
Object result)
exiting in class Logger
public void throwing(String sourceClass,
String sourceMethod,
Throwable thrown)
throwing in class Loggerpublic void severe(String msg)
severe in class Loggerpublic void warning(String msg)
warning in class Loggerpublic void info(String msg)
info in class Loggerpublic void config(String msg)
config in class Loggerpublic void fine(String msg)
fine in class Loggerpublic void finer(String msg)
finer in class Loggerpublic void finest(String msg)
finest in class Logger
public void log(Level level,
String msg)
log in class Logger
public void log(Level level,
String msg,
Object param1)
log in class Logger
public void log(Level level,
String msg,
Object[] params)
log in class Logger
public void log(Level level,
String msg,
Throwable thrown)
log in class Logger
public void logp(Level level,
String sourceClass,
String sourceMethod,
String msg)
logp in class Logger
public void logp(Level level,
String sourceClass,
String sourceMethod,
String msg,
Object param1)
logp in class Logger
public void logp(Level level,
String sourceClass,
String sourceMethod,
String msg,
Object[] params)
logp in class Logger
public void logp(Level level,
String sourceClass,
String sourceMethod,
String msg,
Throwable thrown)
logp in class Logger
public void logrb(Level level,
String sourceClass,
String sourceMethod,
String bundleName,
String msg)
logrb in class Logger
public void logrb(Level level,
String sourceClass,
String sourceMethod,
String bundleName,
String msg,
Object param1)
logrb in class Logger
public void logrb(Level level,
String sourceClass,
String sourceMethod,
String bundleName,
String msg,
Object[] params)
logrb in class Logger
public void logrb(Level level,
String sourceClass,
String sourceMethod,
String bundleName,
String msg,
Throwable thrown)
logrb in class Logger
public void log(String fqcn,
Level level,
String message,
String bundleName,
ExtLogRecord.FormatStyle style,
Object[] params,
Throwable t)
fqcn - the fully qualified class name of the first logger classlevel - the level to log atmessage - the messagebundleName - the resource bundle namestyle - the message format styleparams - the log parameterst - the throwable, if any
public void log(String fqcn,
Level level,
String message,
ExtLogRecord.FormatStyle style,
Object[] params,
Throwable t)
fqcn - the fully qualified class name of the first logger classlevel - the level to log atmessage - the messagestyle - the message format styleparams - the log parameterst - the throwable, if any
public void log(String fqcn,
Level level,
String message,
Throwable t)
fqcn - the fully qualified class name of the first logger classlevel - the level to log atmessage - the messaget - the throwable, if anypublic void logRaw(ExtLogRecord record)
record - the extended log recordpublic void logRaw(LogRecord record)
record - the log recordpublic String toString()
toString in class Object
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
|
JBoss Log Manager 1.5.5.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||