Skip to content

Commit d655684

Browse files
committed
Merge branch '2.1.x'
Closes gh-18079
2 parents f65a290 + ffbd11c commit d655684

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ On your application classpath (for example, inside your jar) you can have an `ap
388388
When running in a new environment, an `application.properties` file can be provided outside of your jar that overrides the `name`.
389389
For one-off testing, you can launch with a specific command line switch (for example, `java -jar app.jar --name="Spring"`).
390390

391+
[[boot-features-external-config-application-json]]
391392
[TIP]
392393
====
393394
The `SPRING_APPLICATION_JSON` properties can be supplied on the command line with an environment variable.
@@ -1627,11 +1628,18 @@ The following example shows potential logging settings in `application.propertie
16271628

16281629
[source,properties,indent=0,subs="verbatim,quotes,attributes"]
16291630
----
1630-
logging.level.root=WARN
1631-
logging.level.org.springframework.web=DEBUG
1632-
logging.level.org.hibernate=ERROR
1631+
logging.level.root=warn
1632+
logging.level.org.springframework.web=debug
1633+
logging.level.org.hibernate=error
16331634
----
16341635

1636+
It's also possible to set logging levels using environment variables.
1637+
For example, `LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_WEB=DEBUG` will set `org.springframework.web` to `DEBUG`.
1638+
1639+
NOTE: The above approach will only work for package level logging.
1640+
Since relaxed binding always converts environment variables to lowercase, it's not possible to configure logging for an individual class in this way.
1641+
If you need to configure logging for a class, you can use <<boot-features-external-config-application-json, the APPLICATION_JSON>> variable.
1642+
16351643

16361644

16371645
[[boot-features-custom-log-groups]]

0 commit comments

Comments
 (0)