Package org.jclouds.logging
Interface Logger
-
- All Known Implementing Classes:
BaseLogger,ConsoleLogger,JDKLogger,Log4JLogger,NullLogger,SLF4JLogger
public interface LoggerJClouds log abstraction layer. Implementations of logging are optional and injected if they are configured.@Resource Logger logger = Logger.NULL;The above will get you a null-safe instance of Logger. If configured, this logger will be swapped with a real Logger implementation with category set to the current class name. This is done post-object construction, so do not attempt to use these loggers in your constructor. If you wish to initialize loggers like these yourself, do not use the @Resource annotation. This implementation first checks to see if the level is enabled before issuing the log command. In other words, don't do the followingif (logger.isTraceEnabled()) logger.trace("message");.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceLogger.LoggerFactoryProduces instances ofLoggerrelevant to the specified category
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddebug(String message, Object... args)voiderror(String message, Object... args)voiderror(Throwable throwable, String message, Object... args)StringgetCategory()voidinfo(String message, Object... args)booleanisDebugEnabled()booleanisErrorEnabled()booleanisInfoEnabled()booleanisTraceEnabled()booleanisWarnEnabled()voidtrace(String message, Object... args)voidwarn(String message, Object... args)voidwarn(Throwable throwable, String message, Object... args)
-
-
-
Method Detail
-
getCategory
String getCategory()
-
isTraceEnabled
boolean isTraceEnabled()
-
isDebugEnabled
boolean isDebugEnabled()
-
isInfoEnabled
boolean isInfoEnabled()
-
isWarnEnabled
boolean isWarnEnabled()
-
isErrorEnabled
boolean isErrorEnabled()
-
-