Skip to main content

Log File Configuration

Written by Tom Wallace
Updated over 2 months ago

By default logging is disabled on your Heed installation. To enable logging you will need to download the .env configuration file and place it within the root of your Heed installation directory, the name of the file must be .env otherwise the Heed services will not load the configuration, once you have copied the file locally you will need to restart each of the Heed services. This file will enable to logging to file and defaults the location to c:\heed_logs, you can change this location if required, please see the Configuration section below for details of all the available configuration options.

Configuration

The following logging behaviours can be controlled with environment variables

Name

Type

Description

Default

HEED__LOGGING__CONSOLE_ENABLED

Boolean

Controls whether logs are written to stdout

true

HEED__LOGGING__CONSOLE_LEVEL

String

Controls the minimum displayed log level

info

HEED__LOGGING__LOGFILE_ENABLED

Boolean

Controls whether logs are written to disk

false

HEED__LOGGING__LOGFILE_LEVEL

String

Controls the minimum level of logs written to disk

info

HEED__LOGGING__LOGFILE_ROTATION_PERIOD

String

A time period on which to rotate the log files. eg 6h, 1d, 2w

1d

HEED__LOGGING__LOGFILE_ROTATION_COUNT

Number

Controls the number of log files to keep in rotation

3

HEED__LOGGING__LOGFILE_PATH

String

An absolute path to a directory in which to save log files

Application install dir

HEED__LOGGING__LOGFILE_FILENAME

String

The name of the log file

heed.log

Log Levels

The following levels are available

  • debug

  • info

  • warn

  • error

  • fatal

debug provides the most verbose logging and fatal provides the least verbose. The default level is info, which means that info, warning, error and fatal messages are displayed.

When troubleshooting issues, you may want to change the logging level to debug so that you can get a more detailed stack trace.

Did this answer your question?