Class 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 Detail

      • HawaiiLoggingConfiguration

        public HawaiiLoggingConfiguration​(HawaiiLoggingConfigurationProperties hawaiiLoggingConfigurationProperties)
        Autowired constructor.
        Parameters:
        hawaiiLoggingConfigurationProperties - the logging configuration properties
    • Method Detail

      • kibanaLogFilterRegistration

        @Bean
        @ConditionalOnProperty(prefix="hawaii.logging.filters.kibana-log",
                               name="enabled")
        public org.springframework.boot.web.servlet.FilterRegistrationBean kibanaLogFilterRegistration​(KibanaLogFilter kibanaLogFilter)
        Register the kibanaLogFilter() bean.
        Parameters:
        kibanaLogFilter - the Kibana log filter
        Returns:
        the KibanaLogFilter bean, wrapped in a FilterRegistrationBean
      • kibanaLogCleanupFilterRegistration

        @Bean
        @ConditionalOnProperty(prefix="hawaii.logging.filters.kibana-log-cleanup",
                               name="enabled")
        public org.springframework.boot.web.servlet.FilterRegistrationBean kibanaLogCleanupFilterRegistration​(KibanaLogCleanupFilter kibanaLogCleanupFilter)
        Register the kibanaLogCleanupFilter() bean.
        Parameters:
        kibanaLogCleanupFilter - the Kibana log cleanup filter
        Returns:
        the kibanaLogCleanupFilter() bean, wrapped in a FilterRegistrationBean
      • requestDurationFilterRegistration

        @Bean
        @ConditionalOnProperty(prefix="hawaii.logging.filters.request-duration",
                               name="enabled")
        public org.springframework.boot.web.servlet.FilterRegistrationBean requestDurationFilterRegistration​(RequestDurationFilter requestDurationFilter)
        Register the requestDurationFilter() bean.
        Parameters:
        requestDurationFilter - the request duration filter
        Returns:
        the requestDurationFilter() bean, wrapped in a FilterRegistrationBean
      • requestIdFilterRegistration

        @Bean
        @ConditionalOnProperty(prefix="hawaii.logging.filters.request-id",
                               name="enabled")
        public org.springframework.boot.web.servlet.FilterRegistrationBean requestIdFilterRegistration​(RequestIdFilter requestIdFilter)
        Register the RequestIdFilter bean.
        Returns:
        the requestIdFilter() bean, wrapped in a FilterRegistrationBean
      • transactionIdFilterRegistration

        @Bean
        @ConditionalOnProperty(prefix="hawaii.logging.filters.transaction-id",
                               name="enabled")
        public org.springframework.boot.web.servlet.FilterRegistrationBean transactionIdFilterRegistration​(TransactionIdFilter transactionIdFilter)
        Register the transactionIdFilter() bean.
        Parameters:
        transactionIdFilter - the transaction id filter
        Returns:
        the transactionIdFilter() bean, wrapped in a FilterRegistrationBean
      • transactionTypeFilter

        @Bean
        @ConditionalOnProperty(prefix="hawaii.logging.filters.transaction-type",
                               name="enabled")
        public TransactionTypeFilter transactionTypeFilter​(org.springframework.context.ApplicationContext applicationContext)
        Create the TransactionTypeFilter bean.
        Parameters:
        applicationContext - the application context of the Spring Boot Application
        Returns:
        the TransactionTypeFilter bean, wrapped in a FilterRegistrationBean
      • transactionTypeFilterRegistration

        @Bean
        @ConditionalOnProperty(prefix="hawaii.logging.filters.transaction-name",
                               name="enabled")
        public org.springframework.boot.web.servlet.FilterRegistrationBean transactionTypeFilterRegistration​(TransactionTypeFilter transactionNameFilter)
        Register the TransactionTypeFilter bean.
        Parameters:
        transactionNameFilter - the transaction name filter
        Returns:
        the TransactionTypeFilter bean, wrapped in a FilterRegistrationBean