Package org.apache.logging.log4j.jul
Class ApiLogger
- java.lang.Object
-
- java.util.logging.Logger
-
- org.apache.logging.log4j.jul.ApiLogger
-
- Direct Known Subclasses:
CoreLogger
public class ApiLogger extends Logger
Log4j API implementation of the JULLoggerclass. Note that this implementation does not use theHandlerclass. Instead, logging is delegated to the underlying Log4jLoggerwhich may be implemented in one of many different ways. Consult the documentation for your Log4j Provider for more details.Note that the methods
Logger.getParent()andsetLevel(java.util.logging.Level)are not supported by this implementation. If you need support for these methods, then you'll need to use log4j-core. TheLogger.getParent()method will not fail (thanks to JUL API limitations), but it won't necessarily be accurate!Also note that
setParent(java.util.logging.Logger)is explicitly unsupported. Parent loggers are determined using the syntax of the logger name; not through an arbitrary graph of loggers.- Since:
- 2.1
-
-
Field Summary
-
Fields inherited from class java.util.logging.Logger
global, GLOBAL_LOGGER_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfig(String msg)protected voiddoSetLevel(Level newLevel)Provides access toLogger.setLevel(java.util.logging.Level).voidentering(String sourceClass, String sourceMethod)voidentering(String sourceClass, String sourceMethod, Object param1)voidentering(String sourceClass, String sourceMethod, Object[] params)voidexiting(String sourceClass, String sourceMethod)voidexiting(String sourceClass, String sourceMethod, Object result)voidfine(String msg)voidfiner(String msg)voidfinest(String msg)StringgetName()voidinfo(String msg)booleanisLoggable(Level level)voidlog(Level level, String msg)voidlog(Level level, String msg, Object param1)voidlog(Level level, String msg, Object[] params)voidlog(Level level, String msg, Throwable thrown)voidlog(LogRecord record)voidlogp(Level level, String sourceClass, String sourceMethod, String msg)voidlogp(Level level, String sourceClass, String sourceMethod, String msg, Object param1)voidlogp(Level level, String sourceClass, String sourceMethod, String msg, Object[] params)voidlogp(Level level, String sourceClass, String sourceMethod, String msg, Throwable thrown)voidlogrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg)voidlogrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg, Object param1)voidlogrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg, Object[] params)voidlogrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg, Throwable thrown)voidsetLevel(Level newLevel)voidsetParent(Logger parent)Unsupported operation.voidsevere(String msg)voidthrowing(String sourceClass, String sourceMethod, Throwable thrown)voidwarning(String msg)-
Methods inherited from class java.util.logging.Logger
addHandler, config, fine, finer, finest, getAnonymousLogger, getAnonymousLogger, getFilter, getGlobal, getHandlers, getLevel, getLogger, getLogger, getParent, getResourceBundle, getResourceBundleName, getUseParentHandlers, info, log, log, logp, logp, logrb, logrb, logrb, logrb, removeHandler, setFilter, setResourceBundle, setUseParentHandlers, severe, warning
-
-
-
-
Method Detail
-
isLoggable
public boolean isLoggable(Level level)
- Overrides:
isLoggablein classLogger
-
setLevel
public void setLevel(Level newLevel) throws SecurityException
- Overrides:
setLevelin classLogger- Throws:
SecurityException
-
doSetLevel
protected void doSetLevel(Level newLevel) throws SecurityException
Provides access toLogger.setLevel(java.util.logging.Level). This method should only be used by child classes.- Throws:
SecurityException- See Also:
Logger.setLevel(java.util.logging.Level)
-
setParent
public void setParent(Logger parent)
Unsupported operation.- Overrides:
setParentin classLogger- Throws:
UnsupportedOperationException- always
-
logp
public void logp(Level level, String sourceClass, String sourceMethod, String msg, Object param1)
-
logp
public void logp(Level level, String sourceClass, String sourceMethod, String msg, Object[] params)
-
logp
public void logp(Level level, String sourceClass, String sourceMethod, String msg, Throwable thrown)
-
logrb
public void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg)
-
logrb
public void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg, Object param1)
-
logrb
public void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg, Object[] params)
-
logrb
public void logrb(Level level, String sourceClass, String sourceMethod, String bundleName, String msg, Throwable thrown)
-
-