Class HawaiiLoggingConfiguration
java.lang.Object
org.hawaiiframework.logging.config.HawaiiLoggingConfiguration
@Configuration
@Import({CxfLoggingConfiguration.class,org.hawaiiframework.sql.DataSourceProxyConfiguration.class,HawaiiLoggingFilterConfiguration.class,ScheduledConfiguration.class,StatementLoggerQueryExecutionListenerConfiguration.class})
public class HawaiiLoggingConfiguration
extends Object
Configures the logging based on the application properties.
This class creates filter beans for the enabled filters.
- Since:
- 2.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbodyExcludedMediaTypeVoter(HawaiiLoggingConfigurationProperties hawaiiLoggingConfigurationProperties) Create aMediaTypeVoterfor body exclusion.Create aHttpRequestResponseDebugLogUtilbean.filterVoter(MediaTypeVoter mediaTypeVoter, RequestVoter requestVoter) Create a filter voter parameter.Create aHawaiiLoggingConfigurationPropertiesbean.hawaiiRequestResponseLogger(HttpRequestResponseHeadersLogUtil headersLogUtil, HttpRequestResponseBodyLogUtil bodyLogUtil, HttpRequestResponseDebugLogUtil debugLogUtil, MediaTypeVoter mediaTypeVoter, MediaTypeVoter bodyExcludedMediaTypeVoter) Create aHawaiiRequestResponseLoggerbean.httpRequestResponseHeadersLogUtil(PasswordMaskerUtil passwordMasker) Create aHttpRequestResponseHeadersLogUtilbean.httpRequestResponseLogBodyUtil(PasswordMaskerUtil passwordMasker) Create aHttpRequestResponseBodyLogUtilbean.loggingClientHttpRequestInterceptor(HawaiiRequestResponseLogger hawaiiRequestResponseLogger) Create aLoggingClientHttpRequestInterceptorbean.mediaTypeVoter(HawaiiLoggingConfigurationProperties hawaiiLoggingConfigurationProperties) Create a Media Type voter.Create aPasswordMaskerUtilbean.requestVoter(HawaiiLoggingConfigurationProperties hawaiiLoggingConfigurationProperties) Create a request voter.
-
Constructor Details
-
HawaiiLoggingConfiguration
public HawaiiLoggingConfiguration()
-
-
Method Details
-
hawaiiLoggingConfigurationProperties
@Bean @RefreshScope public HawaiiLoggingConfigurationProperties hawaiiLoggingConfigurationProperties()Create aHawaiiLoggingConfigurationPropertiesbean.- Returns:
- the bean.
-
passwordMaskerUtil
@Bean @RefreshScope public PasswordMaskerUtil passwordMaskerUtil(HawaiiLoggingConfigurationProperties properties) Create aPasswordMaskerUtilbean.- Parameters:
properties- the configuration properties.- Returns:
- the bean.
-
httpRequestResponseHeadersLogUtil
@Bean @RefreshScope public HttpRequestResponseHeadersLogUtil httpRequestResponseHeadersLogUtil(PasswordMaskerUtil passwordMasker) Create aHttpRequestResponseHeadersLogUtilbean.- Parameters:
passwordMasker- the password masker.- Returns:
- the bean.
-
httpRequestResponseLogBodyUtil
@Bean @RefreshScope public HttpRequestResponseBodyLogUtil httpRequestResponseLogBodyUtil(PasswordMaskerUtil passwordMasker) Create aHttpRequestResponseBodyLogUtilbean.- Parameters:
passwordMasker- the password masker.- Returns:
- the bean.
-
debugLogUtil
Create aHttpRequestResponseDebugLogUtilbean.- Returns:
- the bean.
-
loggingClientHttpRequestInterceptor
@Bean @RefreshScope public LoggingClientHttpRequestInterceptor loggingClientHttpRequestInterceptor(HawaiiRequestResponseLogger hawaiiRequestResponseLogger) Create aLoggingClientHttpRequestInterceptorbean.- Parameters:
hawaiiRequestResponseLogger- The response logger.- Returns:
- the bean.
-
hawaiiRequestResponseLogger
@Bean @ConditionalOnMissingBean(HawaiiRequestResponseLogger.class) @RefreshScope public HawaiiRequestResponseLogger hawaiiRequestResponseLogger(HttpRequestResponseHeadersLogUtil headersLogUtil, HttpRequestResponseBodyLogUtil bodyLogUtil, HttpRequestResponseDebugLogUtil debugLogUtil, MediaTypeVoter mediaTypeVoter, @Qualifier("bodyExcludedMediaTypeVoter") MediaTypeVoter bodyExcludedMediaTypeVoter) Create aHawaiiRequestResponseLoggerbean.- Parameters:
headersLogUtil- util for logging headers.bodyLogUtil- util for logging request/response bodies.debugLogUtil- util for extra debug log formatting.mediaTypeVoter- a Media Type voter.- Returns:
- a
HawaiiRequestResponseLoggerbean.
-
mediaTypeVoter
@Bean @RefreshScope public MediaTypeVoter mediaTypeVoter(HawaiiLoggingConfigurationProperties hawaiiLoggingConfigurationProperties) Create a Media Type voter.- Parameters:
hawaiiLoggingConfigurationProperties- The configuration properties.- Returns:
- The bean.
-
bodyExcludedMediaTypeVoter
@Bean @RefreshScope public MediaTypeVoter bodyExcludedMediaTypeVoter(HawaiiLoggingConfigurationProperties hawaiiLoggingConfigurationProperties) Create aMediaTypeVoterfor body exclusion. -
requestVoter
@Bean @RefreshScope public RequestVoter requestVoter(HawaiiLoggingConfigurationProperties hawaiiLoggingConfigurationProperties) Create a request voter.- Parameters:
hawaiiLoggingConfigurationProperties- The configuration properties.- Returns:
- The bean.
-
filterVoter
@Bean @RefreshScope public FilterVoter filterVoter(MediaTypeVoter mediaTypeVoter, RequestVoter requestVoter) Create a filter voter parameter.- Parameters:
mediaTypeVoter- The media type voter.requestVoter- The request voter.- Returns:
- The bean.
-