mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 08:33:11 +00:00
fix: compatibility with log aggregators
This commit is contained in:
@@ -22,8 +22,7 @@ To select your desired log levels add the corresponding numbers and set the valu
|
||||
|
||||
For example `STAPPS_LOG_LEVEL=17` is 16 + 1 and would log everything that is `OK` or `INFO`.
|
||||
|
||||
If you want to use logger in production (`NODE_ENV=production`) and allow all transports to fail set
|
||||
`ALLOW_NO_TRANSPORT` to `true`.
|
||||
If you want to use logger in production (`NODE_ENV=production`) and allow all transports to fail set `ALLOW_NO_TRANSPORT` to `true`.
|
||||
|
||||
Additionally setting the environment variable `STAPPS_EXIT_LEVEL` which works in the same manner as `STAPPS_LOG_LEVEL` will terminate your process after logging at the selected level(s) (usefull for integration tests). It will be ignored in afore mentioned productive environments.
|
||||
|
||||
@@ -52,7 +51,7 @@ Environment variables are:
|
||||
|
||||
## Transformations
|
||||
|
||||
By default the logger will only add the log level to the message.
|
||||
By default the logger will only add the log level to the message. It will replace newlines with spaces and might skip some of your choosen Transformers when in production (`NODE_ENV=production`) for compatibility reasons with existing log aggregators and analyzers.
|
||||
|
||||
You can change this behavior by setting other Transformers via `Logger.setTransformations`. If you do so, mind the order of the transformers.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user