mirror of
https://github.com/lightbend/config.git
synced 2025-03-24 08:10:24 +08:00
Minor correction to the use of config.root().render() under "Debugging Your Configuration"
Looking at the java/scaladoc of ConfigValue.render() (https://github.com/lightbend/config/blob/master/config/src/main/java/com/typesafe/config/ConfigValue.java#L48-L50) and then looking at the implementation of `render()` itself: https://github.com/lightbend/config/blob/master/config/src/main/java/com/typesafe/config/impl/AbstractConfigValue.java#L364-L374 it appears that `config.root().render()` returns a string that must be printed out, logged etc. Current documentation implies that calling this method will print out the string which seems to be misleading.
This commit is contained in:
parent
1c83360c37
commit
61af0058ef
@ -758,8 +758,10 @@ If you have trouble with your configuration, some useful tips.
|
||||
output on stderr describing each file that is loaded.
|
||||
Note: this feature is not included in the older version in
|
||||
Play/Akka 2.0.
|
||||
- Use `myConfig.root().render()` to get a `Config` printed out as a
|
||||
- Use `myConfig.root().render()` to get a `Config` as a
|
||||
string with comments showing where each value came from.
|
||||
This string can be printed out on console or logged to
|
||||
a file etc.
|
||||
|
||||
### Supports Java 8 and Later
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user