logging.*'s @ConfigurationProperties in spring-boot
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
add a comment |
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
add a comment |
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
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
java spring spring-boot
asked Nov 15 '18 at 15:48
Anand RockzzAnand Rockzz
2,21022943
2,21022943
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 15 '18 at 16:09
Andy BrownAndy Brown
5,52221740
5,52221740
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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