logging.*'s @ConfigurationProperties in spring-boot












1















In Spring-boot, which class reads the logging.* in application.yml ?



for (String name : applicationContext.getBeanNamesForAnnotation(ConfigurationProperties.class)) {
System.out.println(name);
}


I tried the above code, but the one I'm looking for is not listed. spring-docs doesn't mention it. No luck searching the source.



First (specific) question: how to find the class who reads and auto-configures logging.* properties?



Second (much wider) question: how to find the respective @ConfigurationProperties for a specific module in spring-boot?



Output



server-org.springframework.boot.autoconfigure.web.ServerProperties
spring.http-org.springframework.boot.autoconfigure.http.HttpProperties
spring.mvc-org.springframework.boot.autoconfigure.web.servlet.WebMvcProperties
spring.task.execution-org.springframework.boot.autoconfigure.task.TaskExecutionProperties
spring.resources-org.springframework.boot.autoconfigure.web.ResourceProperties
spring.jta-org.springframework.boot.autoconfigure.transaction.jta.JtaProperties
spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties
spring.jpa.hibernate-org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties
spring.jpa-org.springframework.boot.autoconfigure.orm.jpa.JpaProperties
diskSpaceHealthIndicatorProperties
management.health.status-org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorProperties
management.endpoint.health-org.springframework.boot.actuate.autoconfigure.health.HealthEndpointProperties
management.endpoint.configprops-org.springframework.boot.actuate.autoconfigure.context.properties.ConfigurationPropertiesReportEndpointProperties
management.endpoints.jmx-org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointProperties
management.endpoints.web-org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties
management.endpoint.env-org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointProperties
spring.info-org.springframework.boot.autoconfigure.info.ProjectInfoProperties
management.info-org.springframework.boot.actuate.autoconfigure.info.InfoContributorProperties
management.endpoint.logfile-org.springframework.boot.actuate.autoconfigure.logging.LogFileWebEndpointProperties
management.metrics-org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties
management.metrics.export.simple-org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleProperties
management.trace.http-org.springframework.boot.actuate.autoconfigure.trace.http.HttpTraceProperties
spring.gson-org.springframework.boot.autoconfigure.gson.GsonProperties
spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties
spring.data.rest-org.springframework.boot.autoconfigure.data.rest.RepositoryRestProperties
spring.hateoas-org.springframework.boot.autoconfigure.hateoas.HateoasProperties
spring.jdbc-org.springframework.boot.autoconfigure.jdbc.JdbcProperties
spring.task.scheduling-org.springframework.boot.autoconfigure.task.TaskSchedulingProperties
spring.transaction-org.springframework.boot.autoconfigure.transaction.TransactionProperties
spring.servlet.multipart-org.springframework.boot.autoconfigure.web.servlet.MultipartProperties
spring.devtools-org.springframework.boot.devtools.autoconfigure.DevToolsProperties
management.endpoints.web.cors-org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties
management.server-org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties









share|improve this question



























    1















    In Spring-boot, which class reads the logging.* in application.yml ?



    for (String name : applicationContext.getBeanNamesForAnnotation(ConfigurationProperties.class)) {
    System.out.println(name);
    }


    I tried the above code, but the one I'm looking for is not listed. spring-docs doesn't mention it. No luck searching the source.



    First (specific) question: how to find the class who reads and auto-configures logging.* properties?



    Second (much wider) question: how to find the respective @ConfigurationProperties for a specific module in spring-boot?



    Output



    server-org.springframework.boot.autoconfigure.web.ServerProperties
    spring.http-org.springframework.boot.autoconfigure.http.HttpProperties
    spring.mvc-org.springframework.boot.autoconfigure.web.servlet.WebMvcProperties
    spring.task.execution-org.springframework.boot.autoconfigure.task.TaskExecutionProperties
    spring.resources-org.springframework.boot.autoconfigure.web.ResourceProperties
    spring.jta-org.springframework.boot.autoconfigure.transaction.jta.JtaProperties
    spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties
    spring.jpa.hibernate-org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties
    spring.jpa-org.springframework.boot.autoconfigure.orm.jpa.JpaProperties
    diskSpaceHealthIndicatorProperties
    management.health.status-org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorProperties
    management.endpoint.health-org.springframework.boot.actuate.autoconfigure.health.HealthEndpointProperties
    management.endpoint.configprops-org.springframework.boot.actuate.autoconfigure.context.properties.ConfigurationPropertiesReportEndpointProperties
    management.endpoints.jmx-org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointProperties
    management.endpoints.web-org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties
    management.endpoint.env-org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointProperties
    spring.info-org.springframework.boot.autoconfigure.info.ProjectInfoProperties
    management.info-org.springframework.boot.actuate.autoconfigure.info.InfoContributorProperties
    management.endpoint.logfile-org.springframework.boot.actuate.autoconfigure.logging.LogFileWebEndpointProperties
    management.metrics-org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties
    management.metrics.export.simple-org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleProperties
    management.trace.http-org.springframework.boot.actuate.autoconfigure.trace.http.HttpTraceProperties
    spring.gson-org.springframework.boot.autoconfigure.gson.GsonProperties
    spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties
    spring.data.rest-org.springframework.boot.autoconfigure.data.rest.RepositoryRestProperties
    spring.hateoas-org.springframework.boot.autoconfigure.hateoas.HateoasProperties
    spring.jdbc-org.springframework.boot.autoconfigure.jdbc.JdbcProperties
    spring.task.scheduling-org.springframework.boot.autoconfigure.task.TaskSchedulingProperties
    spring.transaction-org.springframework.boot.autoconfigure.transaction.TransactionProperties
    spring.servlet.multipart-org.springframework.boot.autoconfigure.web.servlet.MultipartProperties
    spring.devtools-org.springframework.boot.devtools.autoconfigure.DevToolsProperties
    management.endpoints.web.cors-org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties
    management.server-org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties









    share|improve this question

























      1












      1








      1








      In Spring-boot, which class reads the logging.* in application.yml ?



      for (String name : applicationContext.getBeanNamesForAnnotation(ConfigurationProperties.class)) {
      System.out.println(name);
      }


      I tried the above code, but the one I'm looking for is not listed. spring-docs doesn't mention it. No luck searching the source.



      First (specific) question: how to find the class who reads and auto-configures logging.* properties?



      Second (much wider) question: how to find the respective @ConfigurationProperties for a specific module in spring-boot?



      Output



      server-org.springframework.boot.autoconfigure.web.ServerProperties
      spring.http-org.springframework.boot.autoconfigure.http.HttpProperties
      spring.mvc-org.springframework.boot.autoconfigure.web.servlet.WebMvcProperties
      spring.task.execution-org.springframework.boot.autoconfigure.task.TaskExecutionProperties
      spring.resources-org.springframework.boot.autoconfigure.web.ResourceProperties
      spring.jta-org.springframework.boot.autoconfigure.transaction.jta.JtaProperties
      spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties
      spring.jpa.hibernate-org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties
      spring.jpa-org.springframework.boot.autoconfigure.orm.jpa.JpaProperties
      diskSpaceHealthIndicatorProperties
      management.health.status-org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorProperties
      management.endpoint.health-org.springframework.boot.actuate.autoconfigure.health.HealthEndpointProperties
      management.endpoint.configprops-org.springframework.boot.actuate.autoconfigure.context.properties.ConfigurationPropertiesReportEndpointProperties
      management.endpoints.jmx-org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointProperties
      management.endpoints.web-org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties
      management.endpoint.env-org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointProperties
      spring.info-org.springframework.boot.autoconfigure.info.ProjectInfoProperties
      management.info-org.springframework.boot.actuate.autoconfigure.info.InfoContributorProperties
      management.endpoint.logfile-org.springframework.boot.actuate.autoconfigure.logging.LogFileWebEndpointProperties
      management.metrics-org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties
      management.metrics.export.simple-org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleProperties
      management.trace.http-org.springframework.boot.actuate.autoconfigure.trace.http.HttpTraceProperties
      spring.gson-org.springframework.boot.autoconfigure.gson.GsonProperties
      spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties
      spring.data.rest-org.springframework.boot.autoconfigure.data.rest.RepositoryRestProperties
      spring.hateoas-org.springframework.boot.autoconfigure.hateoas.HateoasProperties
      spring.jdbc-org.springframework.boot.autoconfigure.jdbc.JdbcProperties
      spring.task.scheduling-org.springframework.boot.autoconfigure.task.TaskSchedulingProperties
      spring.transaction-org.springframework.boot.autoconfigure.transaction.TransactionProperties
      spring.servlet.multipart-org.springframework.boot.autoconfigure.web.servlet.MultipartProperties
      spring.devtools-org.springframework.boot.devtools.autoconfigure.DevToolsProperties
      management.endpoints.web.cors-org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties
      management.server-org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties









      share|improve this question














      In Spring-boot, which class reads the logging.* in application.yml ?



      for (String name : applicationContext.getBeanNamesForAnnotation(ConfigurationProperties.class)) {
      System.out.println(name);
      }


      I tried the above code, but the one I'm looking for is not listed. spring-docs doesn't mention it. No luck searching the source.



      First (specific) question: how to find the class who reads and auto-configures logging.* properties?



      Second (much wider) question: how to find the respective @ConfigurationProperties for a specific module in spring-boot?



      Output



      server-org.springframework.boot.autoconfigure.web.ServerProperties
      spring.http-org.springframework.boot.autoconfigure.http.HttpProperties
      spring.mvc-org.springframework.boot.autoconfigure.web.servlet.WebMvcProperties
      spring.task.execution-org.springframework.boot.autoconfigure.task.TaskExecutionProperties
      spring.resources-org.springframework.boot.autoconfigure.web.ResourceProperties
      spring.jta-org.springframework.boot.autoconfigure.transaction.jta.JtaProperties
      spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties
      spring.jpa.hibernate-org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties
      spring.jpa-org.springframework.boot.autoconfigure.orm.jpa.JpaProperties
      diskSpaceHealthIndicatorProperties
      management.health.status-org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorProperties
      management.endpoint.health-org.springframework.boot.actuate.autoconfigure.health.HealthEndpointProperties
      management.endpoint.configprops-org.springframework.boot.actuate.autoconfigure.context.properties.ConfigurationPropertiesReportEndpointProperties
      management.endpoints.jmx-org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointProperties
      management.endpoints.web-org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties
      management.endpoint.env-org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointProperties
      spring.info-org.springframework.boot.autoconfigure.info.ProjectInfoProperties
      management.info-org.springframework.boot.actuate.autoconfigure.info.InfoContributorProperties
      management.endpoint.logfile-org.springframework.boot.actuate.autoconfigure.logging.LogFileWebEndpointProperties
      management.metrics-org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties
      management.metrics.export.simple-org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleProperties
      management.trace.http-org.springframework.boot.actuate.autoconfigure.trace.http.HttpTraceProperties
      spring.gson-org.springframework.boot.autoconfigure.gson.GsonProperties
      spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties
      spring.data.rest-org.springframework.boot.autoconfigure.data.rest.RepositoryRestProperties
      spring.hateoas-org.springframework.boot.autoconfigure.hateoas.HateoasProperties
      spring.jdbc-org.springframework.boot.autoconfigure.jdbc.JdbcProperties
      spring.task.scheduling-org.springframework.boot.autoconfigure.task.TaskSchedulingProperties
      spring.transaction-org.springframework.boot.autoconfigure.transaction.TransactionProperties
      spring.servlet.multipart-org.springframework.boot.autoconfigure.web.servlet.MultipartProperties
      spring.devtools-org.springframework.boot.devtools.autoconfigure.DevToolsProperties
      management.endpoints.web.cors-org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties
      management.server-org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties






      java spring spring-boot






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 15 '18 at 15:48









      Anand RockzzAnand Rockzz

      2,21022943




      2,21022943
























          1 Answer
          1






          active

          oldest

          votes


















          2














          Spring boot's logging classes are in the org.springframework.boot.logging package. It doesn't work using the @ConfigurationProperties method that you've been searching for. Logging properties are transferred to environment variables in the LoggingSystemProperties class and then those environment variables are referenced in the provider's configuration file, e.g. the logback XML config files.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53323095%2flogging-s-configurationproperties-in-spring-boot%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            Spring boot's logging classes are in the org.springframework.boot.logging package. It doesn't work using the @ConfigurationProperties method that you've been searching for. Logging properties are transferred to environment variables in the LoggingSystemProperties class and then those environment variables are referenced in the provider's configuration file, e.g. the logback XML config files.






            share|improve this answer




























              2














              Spring boot's logging classes are in the org.springframework.boot.logging package. It doesn't work using the @ConfigurationProperties method that you've been searching for. Logging properties are transferred to environment variables in the LoggingSystemProperties class and then those environment variables are referenced in the provider's configuration file, e.g. the logback XML config files.






              share|improve this answer


























                2












                2








                2







                Spring boot's logging classes are in the org.springframework.boot.logging package. It doesn't work using the @ConfigurationProperties method that you've been searching for. Logging properties are transferred to environment variables in the LoggingSystemProperties class and then those environment variables are referenced in the provider's configuration file, e.g. the logback XML config files.






                share|improve this answer













                Spring boot's logging classes are in the org.springframework.boot.logging package. It doesn't work using the @ConfigurationProperties method that you've been searching for. Logging properties are transferred to environment variables in the LoggingSystemProperties class and then those environment variables are referenced in the provider's configuration file, e.g. the logback XML config files.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 15 '18 at 16:09









                Andy BrownAndy Brown

                5,52221740




                5,52221740
































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53323095%2flogging-s-configurationproperties-in-spring-boot%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Bressuire

                    Vorschmack

                    Quarantine