Polish doc formatting

pull/1209/head
Phillip Webb 11 years ago
parent 55650bd618
commit 60e60227ad

@ -857,25 +857,26 @@ then you can do that in `application.properties` using the "logging.level" prefi
[source,properties,indent=0,subs="verbatim,quotes,attributes"] [source,properties,indent=0,subs="verbatim,quotes,attributes"]
---- ----
logging.level.org.springframework.web: DEBUG logging.level.org.springframework.web: DEBUG
logging.level.org.hibernate: ERROR logging.level.org.hibernate: ERROR
---- ----
You can also set the location of a file to log to (in addition to the console) using You can also set the location of a file to log to (in addition to the console) using
"logging.file". "logging.file".
To configure the more fine grained settings of a logging system you need to use the native
configuration format supported by the `LoggingSystem` in question. By default Spring Boot
picks up the native configuration from its default location for the system (e.g.
`classpath:/logback.xml` for Logback), but you can set the location of the config file
using the "logging.config" property.
To configure the more fine grained settings of a logging system you need to use the native configuration
format supported by the `LoggingSystem` in question. By default Spring Boot picks up the native
configuration from its default location for the system (e.g. `classpath:/logback.xml` for Logback), but
you can set the location of the config file using the "logging.config" property.
[[howto-configure-logback-for-loggin]] [[howto-configure-logback-for-loggin]]
=== Configure Logback for logging === Configure Logback for logging
If you put a `logback.xml` in the root of your classpath it will be If you put a `logback.xml` in the root of your classpath it will be picked up from there.
picked up from there. Spring Boot provides a default base Spring Boot provides a default base configuration that you can include if you just want
configuration that you can include if you just want to set levels, to set levels, e.g.
e.g.
[source,xml,indent=0,subs="verbatim,quotes,attributes"] [source,xml,indent=0,subs="verbatim,quotes,attributes"]
---- ----

@ -727,27 +727,29 @@ As with console output, `ERROR`, `WARN` and `INFO` level messages are logged by
[[boot-features-custom-log-levels]] [[boot-features-custom-log-levels]]
=== Log Levels === Log Levels
All the supported logging systems can have the logger levels set in the Spring `Environment` All the supported logging systems can have the logger levels set in the Spring
(so for example in `application.properties`) using "logging.level.*=LEVEL" where "LEVEL" is one of `Environment` (so for example in `application.properties`) using ``logging.level.*=LEVEL''
TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. Example `application.properties`: where ``LEVEL'' is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. Example
`application.properties`:
[source,properties,indent=0,subs="verbatim,quotes,attributes"] [source,properties,indent=0,subs="verbatim,quotes,attributes"]
---- ----
logging.level.org.springframework.web: DEBUG logging.level.org.springframework.web: DEBUG
logging.level.org.hibernate: ERROR logging.level.org.hibernate: ERROR
---- ----
[[boot-features-custom-log-configuration]] [[boot-features-custom-log-configuration]]
=== Custom log configuration === Custom log configuration
The various logging systems can be activated by including the appropriate libraries on The various logging systems can be activated by including the appropriate libraries on
the classpath, and further customized by providing a suitable configuration file in the the classpath, and further customized by providing a suitable configuration file in the
root of the classpath, or in a location specified by the Spring `Environment` property root of the classpath, or in a location specified by the Spring `Environment` property
`logging.config`. (Note however that since logging is initialized *before* the `ApplicationContext `logging.config`. (Note however that since logging is initialized *before* the
is created, it isn't possible to control logging from `@PropertySources` in Spring `ApplicationContext` is created, it isn't possible to control logging from
`@Configuration` files. System properties and the conventional Spring Boot external `@PropertySources` in Spring `@Configuration` files. System properties and the
configuration files work just fine.) conventional Spring Boot external configuration files work just fine.)
Depending on your logging system, the following files will be loaded: Depending on your logging system, the following files will be loaded:

Loading…
Cancel
Save