Configuring logs

Configuring log output

You can disable, log to console, log to default log file path or specify a log path at config file, environment or command line argument. Available options:

  • console (default) - log to console
  • false - Logs are disabled
  • true - stop log to console and log to /var/log/dns-proxy-server.log file
  • eg. /tmp/log.log - log to specified path

Config File

{
  ...
  "logFile": "console"
  ...
}

Environment

export MG_LOG_FILE=console

Command line argument

./dns-proxy-server  -log-file=console

Configuring log level

You can change system log level using environment variable, config file, or command line argument, DPS will consider the parameters in that order, first is more important.

Available levels:

  • ERROR
  • WARNING
  • INFO (Default)
  • DEBUG

Environment

export MG_LOG_LEVEL=DEBUG

Config file

{
  ...
  "logLevel": "DEBUG"
  ...
}

Command line argument

./dns-proxy-server -log-level=DEBUG