Advanced Configuration in Java


Configuration variables

System property values override the environment variables.

The Sqreen agent can be configured using environment variables, system property value or a YAML configuration file. Here are the settings that can be customised:

Variable name Description YAML key name Default value
SQREEN_TOKEN The Sqreen token. This identifies the agent to Sqreen backend servers token Empty
SQREEN_LOG_LOCATION Specify a custom file to write Sqreen logs log_location log/sqreen.log
SQREEN_LOG_LEVEL Sqreen logging level log_level WARN
SQREEN_DISABLE Prevent the Sqreen agent from starting. Any value in this environment variable will disable Sqreen. disable false (Sqreen is enabled)

YAML sample configuration

sqreen:
    token: my_secret_token
    log_location: log/sqreen.log
    log_level: WARN
    disable: false

System property sample configuration

-Dsqreen.token=my_secret_token 
-Dsqreen.log_location=log/sqreen.log
-Dsqreen.log_level=WARN
-Dsqreen.disable=false