Package org.jboss.logging.annotations
Annotation Type LogMessage
-
@Retention(CLASS) @Target(METHOD) @Documented public @interface LogMessage
A typed logger method. Indicates that this method will log the associatedMessageto the logger system, as opposed to being a simple message lookup.- Author:
- David M. Lloyd, James R. Perkins
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description org.jboss.logging.Logger.LevellevelThe log level at which this message should be logged.Class<?>loggingClassThe logging class name to use for this message, if any.booleanuseThreadContextIndicates before the message is logged the current threads context class loader is set to the the class loader from this type.
-
-
-
-
loggingClass
Class<?> loggingClass
The logging class name to use for this message, if any.- Returns:
- the logging class name
- Default:
- java.lang.Void.class
-
-
-
useThreadContext
boolean useThreadContext
Indicates before the message is logged the current threads context class loader is set to the the class loader from this type.Note that special permissions may be required if running under a security manager.
It is suggested this not be used on methods which are invoked frequently as there is overhead to this.
- Returns:
trueif the current threads context loader should be used for the log call- Since:
- 2.3.0
- See Also:
Thread.getContextClassLoader(),Thread.setContextClassLoader(ClassLoader)
- Default:
- false
-
-