-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #222 from gestalt-config/feat/static-site
Feat/static site
- Loading branch information
Showing
51 changed files
with
1,341 additions
and
705 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-93.9 KB
docs/gestalt-static/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
sidebar_position: 5 | ||
--- | ||
|
||
# Configuration Options | ||
| Configuration | default | Details | | ||
|-----------------------------------------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| treatWarningsAsErrors | false | if we treat warnings as errors Gestalt will fail on any warnings. When set to true it overrides the behaviour in the below configs. | | ||
| treatMissingArrayIndexAsError | false | By default Gestalt will insert null values into an array or list that is missing an index. By enabling this you will get an exception instead | | ||
| treatMissingValuesAsErrors | false | By default Gestalt will not update values in classes not found in the config. Null values will be left null and values with defaults will keep their defaults. By enabling this you will get an exception if any value is missing. | | ||
| treatMissingDiscretionaryValuesAsErrors | true | Sets treat missing discretionary values (optional, fields with defaults, fields with default annotations) as an error. If this is false you will be able to get the configuration with default values or an empty Optional. If this is true, if a field is missing and would have had a default it will fail and throw an exception. | | ||
| dateDecoderFormat | null | Pattern for a DateTimeFormatter, if left blank will use the default for the decoder | | ||
| localDateTimeFormat | null | Pattern for a DateTimeFormatter, if left blank will use the default for the decoder | | ||
| localDateFormat | null | Pattern for a DateTimeFormatter, if left blank will use the default for the decoder | | ||
| substitutionOpeningToken | `${` | Customize what tokens gestalt looks for when starting replacing substrings | | ||
| substitutionClosingToken | `}` | Customize what tokens gestalt looks for when ending replacing substrings | | ||
| maxSubstitutionNestedDepth | 5 | Get the maximum string substitution nested depth. If you have nested or recursive substitutions that go deeper than this it will fail. | | ||
| nodeIncludeKeyword | `$include` | The token used to denote a included node. If this is found in a path it will attempt to load the node into the tree at this location. | | ||
| nodeNestedIncludeLimit | 5 | The maximum number of nested Node Includes Gestalt will attempt. If you have nested or recursive Includes that go deeper than this it will fail. | | ||
| observationsEnabled | false | if observations should be enabled. This needs to be used in conjunction with the gestalt-micrometer or other observations library. | | ||
| proxyDecoderMode | CACHE | Either CACHE or PASSTHROUGH, where cache means we serve results through a cache that is never updated or pass through where each call is forwarded to Gestalt to be looked up. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
sidebar_position: 7 | ||
--- | ||
|
||
# Logging | ||
Gestalt leverages [System.logger](https://docs.oracle.com/javase/9/docs/api/java/lang/System.Logger.html), the jdk logging library to provide a logging facade. Many logging libraries provide backends for System Logger. | ||
|
||
|
||
## log4j 2 | ||
To use log4j2 as the logging backend for the system logger include these dependencies. This is supported in version 2.13.2 of log4j2. | ||
|
||
In Maven: | ||
```xml | ||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-jpl</artifactId> | ||
<version>${version}</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
``` | ||
Or in Gradle | ||
```kotlin | ||
implementation("org.apache.logging.log4j:log4j-jpl:${version}") | ||
``` | ||
|
||
|
||
## logback | ||
To use logback as the logging backend for the system logger include these dependencies. This is supported in version 2+ of Logback. | ||
|
||
In Maven: | ||
```xml | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-jdk-platform-logging</artifactId> | ||
<version>${version}</version> | ||
</dependency> | ||
``` | ||
Or in Gradle | ||
```kotlin | ||
implementation("org.slf4j:slf4j-jdk-platform-logging:${version}") | ||
``` | ||
|
||
# Secrets in exceptions and logging | ||
Several places in the library we will print out the contents of a node if there is an error, or you call the debug print functionality. | ||
To ensure that no secrets are leaked we conceal the secrets based on searching the path for several keywords. If the keyword is found in the path the leaf value will be replaced with a configurable mask. | ||
|
||
|
||
How to configure the masking rules and the mask. | ||
```java | ||
Gestalt gestalt = new GestaltBuilder() | ||
.addSource(MapConfigSourceBuilder.builder().setCustomConfig(configs).build()) | ||
.addSecurityMaskingRule("port") | ||
.setSecurityMask("&&&&&") | ||
.build(); | ||
|
||
gestalt.loadConfigs(); | ||
|
||
String rootNode = gestalt.debugPrint(Tags.of()); | ||
|
||
Assertions.assertEquals("MapNode{db=MapNode{password=LeafNode{value='test'}, " + | ||
"port=LeafNode{value='*****'}, uri=LeafNode{value='my.sql.com'}}}", rootNode); | ||
``` | ||
|
||
By default, the builder has several rules predefined [here](https://github.com/gestalt-config/gestalt/blob/main/gestalt-core/src/main/java/org/github/gestalt/config/builder/GestaltBuilder.java#L76). |
Oops, something went wrong.