Journalisation
Niveaux de journalisation, fichiers, syslog et couleurs de la console
Modifiez-les pour régler la quantité de journalisation, l’emplacement des fichiers de journaux, ou afficher les horodatages dans votre propre fuseau horaire.
Exemple
Journaliser davantage dans les fichiers que sur la console, et afficher les horodatages des journaux et des jobs à l’heure d’Amsterdam. Dans le .env du projet compose :
LOG_LEVEL=info
LOG_CONSOLE_LEVEL=notice
LOG_TZ=Europe/Amsterdam
Syslog
Les serveurs syslog ne se configurent plus ici : ajoutez-les dans Paramètres > Connexions > Syslog, voir Journaux. Les variables LOG_SYSLOG_* ci-dessous sont dépréciées depuis la 7. Le premier démarrage qui trouve LOG_SYSLOG_HOST défini les importe une fois comme serveur syslog syslog, qui reçoit le journal du serveur, puis les ignore par la suite.
Variables
Toutes les variables de ce groupe, avec leur type, leur valeur par défaut et leur description :
| Variable | Choix/Valeurs par défaut | Commentaires |
|---|---|---|
| LOG_FORMAT string added in version 7.0.0 | Par défaut : text | Log format
Every request gets an id: the X-Request-Id a reverse proxy sent, or a new one. It is returned in the response’s X-Request-Id header and carried by every line written while the request is served ( |
| LOG_LEVEL string | Choix :
| Log level
AnsibleForms logs to a log file called ansibleforms.log. |
| LOG_RETENTION_DAYS number added in version 7.0.0 | Par défaut : 90 | Log file retention (days)
How many days of server log files are kept: the main log and the errors log, one file a day, zipped once the day is over. Older files are deleted. 0 keeps every file. Takes effect at once, without a restart. |
| LOG_PATH string | Par défaut : %PERSISTENT_FOLDER%/logs | Logs folder
AnsibleForms maintains 2 logfiles. Ajouté 4.0.0
Make the logfiles rotating with daily timestamp. 30days of logs are kept. |
| LOG_CONSOLE_LEVEL string | Choix :
| Console log level
When you run ansibleforms, by default the application also logs to the console. |
| LOG_TZ string added in version 5.0.10 | Par défaut : UTC | Log time zone
Sets the timezone for log timestamps. Use a valid IANA timezone string (e.g., UTC, Europe/Amsterdam, America/New_York). Also used for the job timestamps. |
| LOG_SYSLOG_HOST string added in version 3.0.1 | Par défaut : | Syslog host (deprecated)
Deprecated since 7, removed in 8. The first 7.x start that finds |
| LOG_SYSLOG_LEVEL string added in version 3.0.1 | Choix :
| Syslog level (deprecated)
Deprecated since 7, removed in 8. The first 7.x start that finds |
| LOG_SYSLOG_PORT number added in version 3.0.1 | Par défaut : 514 | Syslog port (deprecated)
Deprecated since 7, removed in 8. The first 7.x start that finds |
| LOG_SYSLOG_PROTOCOL string added in version 3.0.1 | Choix :
| Syslog protocol (deprecated)
Deprecated since 7, removed in 8. The first 7.x start that finds |
| LOG_SYSLOG_PATH string added in version 3.0.1 | Par défaut : /dev/log | Syslog path (deprecated)
Deprecated since 7, removed in 8. The first 7.x start that finds |
| LOG_SYSLOG_SOURCE string added in version 3.0.1 | Par défaut : localhost | Syslog source hostname (deprecated)
Deprecated since 7, removed in 8. The first 7.x start that finds |
| LOG_SYSLOG_TYPE string added in version 3.0.1 | Choix :
| Syslog protocol type (deprecated)
Deprecated since 7, removed in 8. The first 7.x start that finds |
| LOG_SYSLOG_APPNAME string added in version 3.0.1 | Par défaut : AnsibleForms | Syslog app name (deprecated)
Deprecated since 7, removed in 8. The first 7.x start that finds |
| LOG_COLOR_ERROR string added in version 3.0.1 | Par défaut : \x1b[31m | Error color code
The escape color code for error (default red) |
| LOG_COLOR_WARN string added in version 3.0.1 | Par défaut : \x1b[33m | Warning color code
The escape color code for warning (default yellow) |
| LOG_COLOR_NOTICE string added in version 3.0.1 | Par défaut : \x1b[37m | Notice color code
The escape color code for notice (default white) |
| LOG_COLOR_INFO string added in version 3.0.1 | Par défaut : \x1b[32m | Info color code
The escape color code for info (default green) |
| LOG_COLOR_DEBUG string added in version 3.0.1 | Par défaut : \x1b[36m | Debug color code
The escape color code for debug (default cyan) |