Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
60e60227
Commit
60e60227
authored
Jul 02, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish doc formatting
parent
55650bd6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
20 deletions
+23
-20
howto.adoc
spring-boot-docs/src/main/asciidoc/howto.adoc
+12
-11
spring-boot-features.adoc
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+11
-9
No files found.
spring-boot-docs/src/main/asciidoc/howto.adoc
View file @
60e60227
...
...
@@ -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"]
----
logging.level.org.springframework.web: DEBUG
logging.level.org.hibernate: ERROR
logging.level.org.springframework.web: DEBUG
logging.level.org.hibernate: ERROR
----
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]]
=== Configure Logback for logging
If you put a `logback.xml` in the root of your classpath it will be
picked up from there. Spring Boot provides a default base
configuration that you can include if you just want to set levels,
e.g.
If you put a `logback.xml` in the root of your classpath it will be picked up from there.
Spring Boot provides a default base configuration that you can include if you just want
to set levels, e.g.
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
----
...
...
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
60e60227
...
...
@@ -727,27 +727,29 @@ As with console output, `ERROR`, `WARN` and `INFO` level messages are logged by
[[boot-features-custom-log-levels]]
=== Log Levels
All the supported logging systems can have the logger levels set in the Spring `Environment`
(so for example in `application.properties`) using "logging.level.*=LEVEL" where "LEVEL" is one of
TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. Example `application.properties`:
All the supported logging systems can have the logger levels set in the Spring
`Environment` (so for example in `application.properties`) using ``logging.level.*=LEVEL''
where ``LEVEL'' is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. Example
`application.properties`:
[source,properties,indent=0,subs="verbatim,quotes,attributes"]
----
logging.level.org.springframework.web: DEBUG
logging.level.org.hibernate: ERROR
logging.level.org.springframework.web: DEBUG
logging.level.org.hibernate: ERROR
----
[[boot-features-custom-log-configuration]]
=== Custom log configuration
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
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
is created, it isn't possible to control logging from `@PropertySources` in Spring
`@
Configuration` files. System properties and the conventional Spring Boot external
configuration files work just fine.)
`logging.config`. (Note however that since logging is initialized *before* the
`ApplicationContext` is created, it isn't possible to control logging from
`@
PropertySources` in Spring `@Configuration` files. System properties and the
con
ventional Spring Boot external con
figuration files work just fine.)
Depending on your logging system, the following files will be loaded:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment