Configuration for JVM - munichbughunter/SevenFacette GitHub Wiki
7Facette provides the possibility of using configuration files. In the resources root folder create a file called facetteConfig.yml. This YAML-file has the following structure:
sevenFacette
log:
level
http:
clients:
clientName:
connectionTimeout
connectionRequestTimeout
socketTimeout
url:
baseUrl
port
protocol
path
proxy:
host
port
authentication:
type
multipleFieldsAccordingToTheAuthenticationType
Kafka:
bootstrap
consumer:
topicname:
useSASLAuthentication
saslUsername
saslPassword
autoOffset
readIsolationLevel
producer:
topicname:
useSASLAuthentication
saslUsername
saslPassword
autoOffset
database:
name:
url
driver
user
password
autoCommit
stopOnError
application:
resources:
- name
path
custom:
keyValuePairs
7Facette provides the following log levels with colour codes:
NONE (default)
ERROR (red)
WARN (yellow)
INFO (white)
DEBUG (white)
If multiple environments exist, different configuration files can be created - one for each environment. To use different files set an environment variable FACETTE_CONFIG with the corresponding filename as value. By this, the chosen file will be used.
It is possible to combine multiple configuration files. This can be useful if you have different test environments. You can combine elements that vary between the environments with elements that stay stable. To import another file just write @import(filename.yml)
at the desired position. This can be done at any depth and in any position. Take in mind that the spaces and indentations also need to be inserted in the imported files.
In different cases, it is recommended to use environment properties, e.g. for usernames and passwords. You can use these variables by typing '[[variableName]]'
inside the YAML file. There is also the possibility to use default values as a fallback. They are inside the square brackets separated from the variable name by pipes [[variableName || fallback value]]
.
There is the possibility to combine 7Facette and Spring Boot. In this case, Spring Boot reads the configuration. That means that the imports and environment variables will not be possible as described above. Use the Spring Boot configuration and map it to the 7Facette configuration. For that see the example-spring module.