Registo
Níveis de registo, ficheiros, syslog e cores da consola
Altere estas para ajustar quanto se regista, para onde vão os ficheiros de registo, ou para mostrar as horas no seu próprio fuso horário.
Exemplo
Registar mais nos ficheiros do que na consola, e mostrar as horas do registo e das tarefas na hora de Amesterdão. No .env do projeto compose:
LOG_LEVEL=info
LOG_CONSOLE_LEVEL=notice
LOG_TZ=Europe/Amsterdam
Syslog
Os servidores syslog já não se configuram aqui: adicione-os em Definições > Ligações > Syslog, consulte Registos. As variáveis LOG_SYSLOG_* abaixo estão obsoletas desde a 7. O primeiro arranque que encontra LOG_SYSLOG_HOST definida importa-as uma vez como o servidor syslog syslog, que recebe o registo do servidor, e a partir daí ignora-as.
Variáveis
Todas as variáveis deste grupo, com o seu tipo, predefinição e descrição:
| Variável | Opções/Valores predefinidos | Comentários |
|---|---|---|
| LOG_FORMAT string added in version 7.0.0 | Predefinição: 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 | Opções:
| Log level
AnsibleForms logs to a log file called ansibleforms.log. |
| LOG_RETENTION_DAYS number added in version 7.0.0 | Predefinição: 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 | Predefinição: %PERSISTENT_FOLDER%/logs | Logs folder
AnsibleForms maintains 2 logfiles. Adicionado 4.0.0
Make the logfiles rotating with daily timestamp. 30days of logs are kept. |
| LOG_CONSOLE_LEVEL string | Opções:
| 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 | Predefinição: 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 | Predefinição: | 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 | Opções:
| 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 | Predefinição: 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 | Opções:
| 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 | Predefinição: /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 | Predefinição: 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 | Opções:
| 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 | Predefinição: 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 | Predefinição: \x1b[31m | Error color code
The escape color code for error (default red) |
| LOG_COLOR_WARN string added in version 3.0.1 | Predefinição: \x1b[33m | Warning color code
The escape color code for warning (default yellow) |
| LOG_COLOR_NOTICE string added in version 3.0.1 | Predefinição: \x1b[37m | Notice color code
The escape color code for notice (default white) |
| LOG_COLOR_INFO string added in version 3.0.1 | Predefinição: \x1b[32m | Info color code
The escape color code for info (default green) |
| LOG_COLOR_DEBUG string added in version 3.0.1 | Predefinição: \x1b[36m | Debug color code
The escape color code for debug (default cyan) |