Managing logs


Introduction

TRAX LRS 3.0 comes with a new flexible and comprehensive logging system, relying on the Laravel logging capabilities. You can record logs in the TRAX LRS database and explore them from the TRAX LRS user interface, or you can use external systems such as Slack or Papertrail. You can even combine both.

Creating log channels

When something important happens in TRAX LRS, the application tries to record a log. There are many ways to record and retrieve logs: using files, using a database, using a specialized system, etc. So the first thing to do in order to record logs is to define so called log channels, which can be done on the Logging > Log Channels page.

image

For each log channel, you have to define:

  • The type of channel, which is the system used to store and retrieve logs
  • The type(s) of logs to be recorded by the channel
  • The minimum level of logs to be recorded by the channel

image

Types of channel

Name Description
Database Logs are recorded in the TRAX LRS database (logging service).
Single file Logs are recorded in a single file.
Daily file Logs are recorded in a different file each day.
Strerr Logs are sent to the standard error output of the system.
Syslog Logs are recorded following the syslog standard.
Errorlog Logs are recorded using the PHP error_log() function.
Slack Logs are sent to the Slack platform.
Papertrail Logs are sent to the Papertrail platform.

Depending of the type of channel you selected, you may have to add some configuration options to your LRS installation. Please, check the Laravel documentation to go further.

Types of logs

Name Description
Standard APIs Log actions from the standard APIs.
Extended APIs Log actions from the extended APIs (all APIs except the standard ones).
Front-end (UI) Log actions from the user interface.
Console Log actions from console commands.
Auth Log actions related to the authentication.
Redis Stream Log actions related to Redis Stream (micro-services config).

Levels of logs

Name Description
Debug Level 1 of syslog severity levels
Info Level 2 of syslog severity levels
Notice Level 3 of syslog severity levels
Warning Level 4 of syslog severity levels
Error Level 5 of syslog severity levels
Critical Level 6 of syslog severity levels
Alert Level 7 of syslog severity levels
Emergency Level 8 of syslog severity levels

Reviewing logs

If you created a database log channel, you can review the logs directly from the TRAX LRS user interface, from the Logging > Logs Review page. Logs can be filtered by type, level and store, and details can be displayed for most of them.

image

Deleting logs

In order to delete logs, you can go to the Logging > Logs Deletion page and create a logs deletion job, specifying the store, maximum level of log, and more recent date of log.

image