Advanced Configuration in Node.js

Sqreen settings can be optionally adjusted according to your needs. This section lists the possible configuration options you have with Sqreen Node.js agent.

Configuration sources

The Sqreen Agent read its configuration from different places: * The environment * A JSON file

The JSON file can be located in: * Your application top level directory: sqreen.json * In a custom place set by SQREEN_CONFIG_FILE environment variable:

export SQREEN_CONFIG_FILE=/custom/path/sqreen.json 

Configuration variables

The Sqreen agent can be configured using the environment or a JSON file. Here are the settings that can be changed:

Env variable name Role JSON key name Default value
SQREEN_TOKEN The Sqreen token. This identifies the agent to Sqreen backend servers token Empty
SQREEN_CONFIG_FILE Custom location for the JSON based config 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