Class CallLogger.Builder
- Enclosing class:
- CallLogger
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Instantiates a new call logger based on the settings in this builder.debugRules(CallLoggerRule... values) Adds logging rules to use when debug mode is enabled.disabled()Shortcut for callingenabled( .NEVER )enabled(Enablement value) Specifies the default logging enablement setting.enabledTest(Predicate<jakarta.servlet.http.HttpServletRequest> value) Specifies the default logging enablement test predicate.The default logging level to use for logging the request/response.Specifies the logger to use for logging the request.Specifies the logger to use for logging the request.loggerOnce(Logger value) Same aslogger(Logger)but only sets the value if it's currentlynull .normalRules(CallLoggerRule... values) Adds logging rules to use when debug mode is not enabled.requestDetail(CallLoggingDetail value) The default level of detail to log on a request.responseDetail(CallLoggingDetail value) The default level of detail to log on a response.rules(CallLoggerRule... values) Shortcut for adding the same rules as normal and debug rules.thrownStore(ThrownStore value) Specifies the thrown exception store to use for getting stack trace information (hash IDs and occurrence counts).thrownStoreOnce(ThrownStore value) Same asthrownStore(ThrownStore)but only sets the value if it's currentlynull .
- 
Constructor Details- 
BuilderConstructor.- Parameters:
- beanStore- The bean store to use for creating beans.
 
 
- 
- 
Method Details- 
loggerSpecifies the logger to use for logging the request.If not specified, the logger name is determined in the following order: - "juneau.restLogger.logger"system property.- "JUNEAU_RESTLOGGER_LOGGER"environment variable.- "global" .
 The CallLogger.getLogger()method can also be overridden to provide different logic.- Parameters:
- value- The logger to use for logging the request.
- Returns:
- This object.
 
- 
loggerSpecifies the logger to use for logging the request.Shortcut for calling logger(Logger. .getLogger (value))If not specified, the logger name is determined in the following order: - "juneau.restLogger.logger"system property.- "JUNEAU_RESTLOGGER_LOGGER"environment variable.- "global" .
 The CallLogger.getLogger()method can also be overridden to provide different logic.- Parameters:
- value- The logger to use for logging the request.
- Returns:
- This object.
 
- 
loggerOnceSame aslogger(Logger)but only sets the value if it's currentlynull .- Parameters:
- value- The logger to use for logging the request.
- Returns:
- This object.
 
- 
thrownStoreSpecifies the thrown exception store to use for getting stack trace information (hash IDs and occurrence counts).- Parameters:
- value- The stack trace store.
 If- null , stack trace information will not be logged.
- Returns:
- This object.
 
- 
thrownStoreOnceSame asthrownStore(ThrownStore)but only sets the value if it's currentlynull .- Parameters:
- value- The stack trace store.
 If- null , stack trace information will not be logged.
- Returns:
- This object.
 
- 
enabledSpecifies the default logging enablement setting.This specifies the default logging enablement value if not set on the first matched rule or if no rules match. If not specified, the setting is determined via the following: - "juneau.restLogger.enabled"system property.- "JUNEAU_RESTLOGGER_ENABLED"environment variable.- "ALWAYS" .
 - ALWAYS(default) - Logging is enabled.
- NEVER- Logging is disabled.
- CONDITIONALLY- Logging is enabled if it passes the- enabledTest(Predicate)test.
 - Parameters:
- value- The default enablement flag value. Can be- null to use the default.
- Returns:
- This object.
 
- 
enabledTestSpecifies the default logging enablement test predicate.This specifies the default logging enablement test if not set on the first matched rule or if no rules match. This setting has no effect if the enablement setting is not CONDITIONALLY.The default if not specified is x ->false - Parameters:
- value- The default enablement flag value. Can be- null to use the default.
- Returns:
- This object.
 
- 
disabledShortcut for callingenabled( .NEVER )- Returns:
- This object.
 
- 
requestDetailThe default level of detail to log on a request.This specifies the default level of request detail if not set on the first matched rule or if no rules match. If not specified, the setting is determined via the following: - "juneau.restLogger.requestDetail"system property.- "JUNEAU_RESTLOGGER_requestDetail"environment variable.- "STATUS_LINE" .
 - STATUS_LINE- Log only the status line.
- HEADER- Log the status line and headers.
- ENTITY- Log the status line and headers and content if available.
 - Parameters:
- value- The new value for this property, or- null to use the default.
- Returns:
- This object.
 
- 
responseDetailThe default level of detail to log on a response.This specifies the default level of response detail if not set on the first matched rule or if no rules match. If not specified, the setting is determined via the following: - "juneau.restLogger.responseDetail"system property.- "JUNEAU_RESTLOGGER_responseDetail"environment variable.- "STATUS_LINE" .
 - STATUS_LINE- Log only the status line.
- HEADER- Log the status line and headers.
- ENTITY- Log the status line and headers and content if available.
 - Parameters:
- value- The new value for this property, or- null to use the default.
- Returns:
- This object.
 
- 
levelThe default logging level to use for logging the request/response.This specifies the default logging level if not set on the first matched rule or if no rules match. If not specified, the setting is determined via the following: - "juneau.restLogger.level"system property.- "JUNEAU_RESTLOGGER_level"environment variable.- "OFF" .
 - Parameters:
- value- The new value for this property, or- null to use the default value.
- Returns:
- This object.
 
- 
normalRulesAdds logging rules to use when debug mode is not enabled.Logging rules are matched in the order they are added. The first to match wins. - Parameters:
- values- The logging rules to add to the list of rules.
- Returns:
- This object.
 
- 
debugRulesAdds logging rules to use when debug mode is enabled.Logging rules are matched in the order they are added. The first to match wins. - Parameters:
- values- The logging rules to add to the list of rules.
- Returns:
- This object.
 
- 
rulesShortcut for adding the same rules as normal and debug rules.Logging rules are matched in the order they are added. The first to match wins. - Parameters:
- values- The logging rules to add to the list of rules.
- Returns:
- This object.
 
- 
buildInstantiates a new call logger based on the settings in this builder.- Returns:
- A new call logger.
 
 
-