public @interface Logging
RestCallLogger
used by REST classes and methods.
This annotation can be used on the RestResource.logging()
and RestMethod.logging()
annotations
to control how and when HTTP requests are logged and at what level of detail.
This annotation is inheritable from parent classes and overridable by child classes. When defined on multiple levels,
the annotation values are combined.
Rules defined on child classes are matched before rules defined on parent classes.
Modifier and Type | Optional Element and Description |
---|---|
String |
disabled
Disables logging entirely for this servlet or method.
|
String |
level
Identifies the logging level at which to log REST calls.
|
LoggingRule[] |
rules
Defines the rules to use for logging REST calls.
|
String |
stackTraceHashingTimeout
Specifies the time in milliseconds to cache stack trace hashes.
|
String |
useStackTraceHashing
Specifies whether to use stack trace hashing in the log file.
|
public abstract String disabled
The possible values are (case-insensitive):
The No-Trace setting on a request can be set by adding RestRequest.setNoTrace(Boolean)
or
RestResponse.setNoTrace(Boolean)
methods.
Setting this value to
public abstract String level
See the Level
class for possible values.
Values are case-insensitive.
The default level is Level.INFO
.
Level.OFF
can be used to turn off logging.
public abstract LoggingRule[] rules
No defines rules results in no logged messages.
public abstract String stackTraceHashingTimeout
This setting can be used to periodically log stack traces (e.g. every 24 hours) so that stack traces don't get lost from rolling-over log files.
public abstract String useStackTraceHashing
This setting can be used to eliminate duplicate stacktraces in your log file by logging them once and then logging identifying hash IDs.
The possible values are (case-insensitive):
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.