Skip to content

Logging

This section describes logging configuration, that can be applied for below Lime-CRM server services:

  • Web Server
  • Search Indexer
  • Event Handler
  • Task Handler
  • Task Scheduler
  • Importer

Logging can be configured through environmental variables and the application configuration. Environmental variables take precedence over the application configuration.

Configuration

As a result, the root logger is configured.

Environmental Variable Configuration key
(under logging section)
Description Default value
LOGLEVEL level Sets the logging level. Accepted values are: DEBUG, INFO, WARNING, ERROR, CRITICAL. WARNING
LIME_LOG_STDOUT_HANDLER stdout_handler Indicates whether log messages should be printed to the standard output (usually console). True
LIME_LOG_STDOUT_HANDLER_JSON_FORMAT stdout_handler_json_format Indicates whether log messages printed to the standard output should be json-formatted. False
LIME_LOG_ROTATING_FILE_HANDLER rotating_file_handler Indicates whether log messages should be saved to a file that is being rotated, based on its size. False
LIME_LOG_ROTATING_FILE_NAME rotating_file_name Sets a name for the rotating file. logs.log
LIME_LOG_ROTATING_FILE_MAX_SIZE rotating_file_max_size Sets a maximum size of the rotating file, in megabytes. 10
LIME_LOG_ROTATING_FILE_BACKUP_COUNT rotating_file_backup_count Sets a maximum number of rotating files. 10
LIME_LOG_ROTATING_JSON_FILE_HANDLER rotating_json_file_handler Indicates whether log messages should be saved to a json file that is being rotated, based on its size. False
LIME_LOG_ROTATING_JSON_FILE_NAME rotating_json_file_name Sets a name for the rotating json file. logs.json.log
LIME_LOG_ROTATING_JSON_FILE_MAX_SIZE rotating_json_file_max_bytes Sets a maximum size of the rotating json file, in megabytes. 10
LIME_LOG_ROTATING_JSON_FILE_BACKUP_COUNT rotating_json_file_backup_count Sets a maximum number of rotating json files. 10
LIME_LOG_TIMED_ROTATING_FILE_HANDLER timed_rotating_file_handler Indicates whether log messages should be saved to a file that is being periodically rotated. False
LIME_LOG_TIMED_ROTATING_FILE_NAME timed_rotating_file_name Sets a name for the timed rotating file. logs-timed.log
LIME_LOG_TIMED_ROTATING_FILE_INTERVAL timed_rotating_file_interval Sets an interval (in minutes) for the timed rotating file, after which a new file will be created. 60
LIME_LOG_TIMED_ROTATING_FILE_BACKUP_COUNT timed_rotating_file_backup_count Sets a maximum number of timed rotating files. 6
LIME_LOG_REDIRECT_STDOUT redirect_stdout Indicates whether messages from standard output (like prints) should be redirected to the logger. False