Package org.apache.juneau.rest.logger
Class BasicTestCallLogger
java.lang.Object
org.apache.juneau.rest.logger.CallLogger
org.apache.juneau.rest.logger.BasicTestCallLogger
Default implementation of a
CallLogger
that only logs REST call errors unless no-log is enabled on the request.
Useful for REST tests where you know that a particular call is going to produce an error response and you don't want that response to be logged producing noisy test output.
Requests can be tagged as no-log (meaning don't log if there's an error) in any of the following ways:
- A
"No-Trace: true" header. - A
"noTrace=true" query parameter. - A
"NoTrace" request attribute with a string value of"true" .
Configured Settings:
- Logs to the
context logger
. - Only calls with status code >=400 will be logged.
- Logs full request and response entity.
See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juneau.rest.logger.CallLogger
CallLogger.Builder, CallLogger.Void
-
Field Summary
Fields inherited from class org.apache.juneau.rest.logger.CallLogger
SP_enabled, SP_level, SP_logger, SP_requestDetail, SP_responseDetail
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
BasicTestCallLogger
Constructor.- Parameters:
beanStore
- The bean store containing injectable beans for this logger.
-
-
Method Details
-
init
Description copied from class:CallLogger
Initializer.Subclasses should override this method to make modifications to the builder used to create this logger.
- Overrides:
init
in classCallLogger
- Parameters:
beanStore
- The bean store containing injectable beans for this logger.- Returns:
- A new builder object.
-