Configuration
Klogging starts with no configuration and will not send any log events. You configure Klogging using either:
- in code using the Configuration domain-specific language
- using from a JSON or HOCON configuration file.
You can also override some configuration by setting Environment variables.
How Klogging finds configuration files
Klogging follows these steps for finding configuration files:
- If the environment variable
KLOGGING_CONFIG_PATH
is set, look for a file at that absolute path. Load the contents if found. - If the environment variable is not set or the specified file is not found, search the classpath:
for
klogging.json
and load the contents if found; otherwise forklogging.conf
and load the contents if found.
Once a file has been found, attempt to interpret it as JSON or HOCON.