Package org.silverpeas.core.util.logging
Class ErrorAnnotationProcessor
- java.lang.Object
-
- org.silverpeas.core.util.logging.ErrorAnnotationProcessor
-
@Interceptor @Error @Priority(2000) public class ErrorAnnotationProcessor extends Object
A processor of theError
annotations. Each time a method annotated with this annotation or a method of a class annotated with is annotation is invoked, this processor will produce a log record when the method execution throws an exception. With the message, either the default one (the message of the exception) or the one specified with the annotation, the name and the unique identifier of the user behind the method execution is also written with the message.- Author:
- mmoquillon
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
SYSTEM_CUSTOM_PATTERN
protected static String
SYSTEM_DEFAULT_PATTERN
protected static String
USER_CUSTOM_PATTERN
protected static String
USER_DEFAULT_PATTERN
-
Constructor Summary
Constructors Constructor Description ErrorAnnotationProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
produceLogRecords(javax.interceptor.InvocationContext context)
-
-
-
Field Detail
-
SYSTEM_DEFAULT_PATTERN
protected static final String SYSTEM_DEFAULT_PATTERN
- See Also:
- Constant Field Values
-
USER_DEFAULT_PATTERN
protected static final String USER_DEFAULT_PATTERN
- See Also:
- Constant Field Values
-
SYSTEM_CUSTOM_PATTERN
protected static final String SYSTEM_CUSTOM_PATTERN
- See Also:
- Constant Field Values
-
USER_CUSTOM_PATTERN
protected static final String USER_CUSTOM_PATTERN
- See Also:
- Constant Field Values
-
-