Logging

Concepts 2023-11-30 11:00

Logging

Logging is a very important topic when it comes to debugging

Settings

Specially when it comes to sharing the main configuration and other resources in a multi instance environment, changing log settings for single instances may be helpful.

File “log.json”

Using this file in the root folder of the system provides a way to adapt the log settings.

levelinteger (-1..9) 

The log level

Using -1 will use the default

typeinteger (-1..4 

The log type

Using -1 will use the default

pathstring If log type needs a path, this is set here
The available log settings

The following loggers are available.

0

System Logger

Depends on the used PHP Runtime

 Recommended for production and testing
1  Unused
2  Unused
3

File Logger

The setting of “path” is used.

 

Default logger

Recommended for development

4SAPI Logger  
The available log types

The following table shows the available log tags, levels and level tags.

Because the system is able to push special hints to Sentry the column “For Sentry” is given where the log levels are shown which are posted to Sentry.

Argument in Log functionsLevelLevel tagFor Sentry 
“fatal”,
“emergency”, “emerg”,
"alert",
“critical”, “crit”
0“fatal”“fatal” 
“error”0“error”“error” 
“warning”, “warn”1“warn”“warning” 
“notice”2“notice”“info”Default level filter for production and testing.
“info”3“info”“info” 
 4  Unused
 5  Unused
 6  Unused
“verbose”, “log”7“verbose”“debug” 
“debug”8“debug”“debug” 
“silly”,
“trace”
9“silly”“debug”Default level filter for development.
The available log levels

This example would be typical for automatic rollout.

{
		"level": -1,
		"type": 0
}