Class HawaiiLoggingConfiguration
- java.lang.Object
-
- org.hawaiiframework.logging.config.HawaiiLoggingConfiguration
-
@Configuration @EnableConfigurationProperties(HawaiiLoggingConfigurationProperties.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
- Author:
- Wouter Eerdekens, Paul Klos, Rutger Lubbers
-
-
Constructor Summary
Constructors Constructor Description HawaiiLoggingConfiguration(HawaiiLoggingConfigurationProperties hawaiiLoggingConfigurationProperties)
Autowired constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpRequestResponseLogUtil
httpRequestResponseLogUtil()
Create aHttpRequestResponseLogUtil
bean.KibanaLogCleanupFilter
kibanaLogCleanupFilter()
Create theKibanaLogCleanupFilter
bean.org.springframework.boot.web.servlet.FilterRegistrationBean
kibanaLogCleanupFilterRegistration(KibanaLogCleanupFilter kibanaLogCleanupFilter)
Register thekibanaLogCleanupFilter()
bean.KibanaLogFilter
kibanaLogFilter()
Create theKibanaLogFilter
bean.org.springframework.boot.web.servlet.FilterRegistrationBean
kibanaLogFilterRegistration(KibanaLogFilter kibanaLogFilter)
Register thekibanaLogFilter()
bean.RequestDurationFilter
requestDurationFilter()
Create theRequestDurationFilter
bean.org.springframework.boot.web.servlet.FilterRegistrationBean
requestDurationFilterRegistration(RequestDurationFilter requestDurationFilter)
Register therequestDurationFilter()
bean.RequestIdFilter
requestIdFilter()
Create theRequestIdFilter
bean.org.springframework.boot.web.servlet.FilterRegistrationBean
requestIdFilterRegistration(RequestIdFilter requestIdFilter)
Register theRequestIdFilter
bean.RequestResponseLogFilter
requestResponseLogFilter(HttpRequestResponseLogUtil httpRequestResponseLogUtil)
Create the request/response logging filter bean.org.springframework.boot.web.servlet.FilterRegistrationBean
requestResponseLogFilterRegistration(RequestResponseLogFilter requestResponseLogFilter)
Create and register theRequestResponseLogFilter
bean.TransactionIdFilter
transactionIdFilter()
Create theTransactionIdFilter
bean.org.springframework.boot.web.servlet.FilterRegistrationBean
transactionIdFilterRegistration(TransactionIdFilter transactionIdFilter)
Register thetransactionIdFilter()
bean.TransactionTypeFilter
transactionTypeFilter(org.springframework.context.ApplicationContext applicationContext)
Create theTransactionTypeFilter
bean.org.springframework.boot.web.servlet.FilterRegistrationBean
transactionTypeFilterRegistration(TransactionTypeFilter transactionNameFilter)
Register theTransactionTypeFilter
bean.
-
-
-
Constructor Detail
-
HawaiiLoggingConfiguration
public HawaiiLoggingConfiguration(HawaiiLoggingConfigurationProperties hawaiiLoggingConfigurationProperties)
Autowired constructor.- Parameters:
hawaiiLoggingConfigurationProperties
- the logging configuration properties
-
-
Method Detail
-
kibanaLogFilter
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.kibana-log", name="enabled") public KibanaLogFilter kibanaLogFilter()
Create theKibanaLogFilter
bean.- Returns:
- the
KibanaLogFilter
bean
-
kibanaLogFilterRegistration
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.kibana-log", name="enabled") public org.springframework.boot.web.servlet.FilterRegistrationBean kibanaLogFilterRegistration(KibanaLogFilter kibanaLogFilter)
Register thekibanaLogFilter()
bean.- Parameters:
kibanaLogFilter
- the Kibana log filter- Returns:
- the
KibanaLogFilter
bean, wrapped in aFilterRegistrationBean
-
kibanaLogCleanupFilter
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.kibana-log-cleanup", name="enabled") public KibanaLogCleanupFilter kibanaLogCleanupFilter()
Create theKibanaLogCleanupFilter
bean.- Returns:
- the
KibanaLogCleanupFilter
bean
-
kibanaLogCleanupFilterRegistration
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.kibana-log-cleanup", name="enabled") public org.springframework.boot.web.servlet.FilterRegistrationBean kibanaLogCleanupFilterRegistration(KibanaLogCleanupFilter kibanaLogCleanupFilter)
Register thekibanaLogCleanupFilter()
bean.- Parameters:
kibanaLogCleanupFilter
- the Kibana log cleanup filter- Returns:
- the
kibanaLogCleanupFilter()
bean, wrapped in aFilterRegistrationBean
-
requestDurationFilter
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.request-duration", name="enabled") public RequestDurationFilter requestDurationFilter()
Create theRequestDurationFilter
bean.- Returns:
- the
RequestDurationFilter
bean
-
requestDurationFilterRegistration
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.request-duration", name="enabled") public org.springframework.boot.web.servlet.FilterRegistrationBean requestDurationFilterRegistration(RequestDurationFilter requestDurationFilter)
Register therequestDurationFilter()
bean.- Parameters:
requestDurationFilter
- the request duration filter- Returns:
- the
requestDurationFilter()
bean, wrapped in aFilterRegistrationBean
-
requestIdFilter
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.request-id", name="enabled") public RequestIdFilter requestIdFilter()
Create theRequestIdFilter
bean.- Returns:
- the
RequestIdFilter
bean
-
requestIdFilterRegistration
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.request-id", name="enabled") public org.springframework.boot.web.servlet.FilterRegistrationBean requestIdFilterRegistration(RequestIdFilter requestIdFilter)
Register theRequestIdFilter
bean.- Returns:
- the
requestIdFilter()
bean, wrapped in aFilterRegistrationBean
-
requestResponseLogFilter
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.request-response", name="enabled") public RequestResponseLogFilter requestResponseLogFilter(HttpRequestResponseLogUtil httpRequestResponseLogUtil)
Create the request/response logging filter bean.- Returns:
- the
RequestResponseLogFilter
bean
-
requestResponseLogFilterRegistration
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.request-response", name="enabled") public org.springframework.boot.web.servlet.FilterRegistrationBean requestResponseLogFilterRegistration(RequestResponseLogFilter requestResponseLogFilter)
Create and register theRequestResponseLogFilter
bean.- Returns:
- the
requestResponseLogFilter(HttpRequestResponseLogUtil)
bean, wrapped in aFilterRegistrationBean
-
transactionIdFilter
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.transaction-id", name="enabled") public TransactionIdFilter transactionIdFilter()
Create theTransactionIdFilter
bean.- Returns:
- the
TransactionIdFilter
bean
-
transactionIdFilterRegistration
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.transaction-id", name="enabled") public org.springframework.boot.web.servlet.FilterRegistrationBean transactionIdFilterRegistration(TransactionIdFilter transactionIdFilter)
Register thetransactionIdFilter()
bean.- Parameters:
transactionIdFilter
- the transaction id filter- Returns:
- the
transactionIdFilter()
bean, wrapped in aFilterRegistrationBean
-
transactionTypeFilter
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.transaction-type", name="enabled") public TransactionTypeFilter transactionTypeFilter(org.springframework.context.ApplicationContext applicationContext)
Create theTransactionTypeFilter
bean.- Parameters:
applicationContext
- the application context of the Spring Boot Application- Returns:
- the
TransactionTypeFilter
bean, wrapped in aFilterRegistrationBean
-
transactionTypeFilterRegistration
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.transaction-name", name="enabled") public org.springframework.boot.web.servlet.FilterRegistrationBean transactionTypeFilterRegistration(TransactionTypeFilter transactionNameFilter)
Register theTransactionTypeFilter
bean.- Parameters:
transactionNameFilter
- the transaction name filter- Returns:
- the
TransactionTypeFilter
bean, wrapped in aFilterRegistrationBean
-
httpRequestResponseLogUtil
@Bean @ConditionalOnProperty(prefix="hawaii.logging.filters.request-response", name="enabled") public HttpRequestResponseLogUtil httpRequestResponseLogUtil()
Create aHttpRequestResponseLogUtil
bean. This is required for theRequestResponseLogFilter
, seerequestResponseLogFilter(HttpRequestResponseLogUtil)
.- Returns:
- the bean
-
-