Top Description Methods
org.jboss.logging.annotations

public @Interface LogMessage

extends Annotation
Annotations
@Retention:CLASS
@Target:METHOD
@Documented
Static Imports
java.lang.annotation.ElementType.METHOD, .RetentionPolicy.CLASS

A typed logger method. Indicates that this method will log the associated Message to the logger system, as opposed to being a simple message lookup.
Authors
David M. Lloyd, James R. Perkins

Method Summary

Modifier and TypeMethod and Description
public Logger.Level

Returns:

the log level
level
()

The log level at which this message should be logged.

public Class<?>

Returns:

the logging class name
loggingClass
()

The logging class name to use for this message, if any.

public boolean

Returns:

true if the current threads context loader should be used for the log call
useThreadContext
()

Indicates before the message is logged the current threads context class loader is set to the the class loader from this type.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

levelback to summary
public Logger.Level level()

The log level at which this message should be logged. Defaults to INFO.

Returns:Logger.Level

the log level

loggingClassback to summary
public Class<?> loggingClass()

The logging class name to use for this message, if any.

Returns:Class<?>

the logging class name

useThreadContextback to summary
public 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:boolean

true if the current threads context loader should be used for the log call

Since
2.3.0
See Also
Thread#getContextClassLoader(), Thread#setContextClassLoader(ClassLoader)