From 19272690c64573edce66f01812dc14ff8ba00b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Tue, 27 Aug 2024 17:24:08 +0200 Subject: [PATCH] refactor: Convert `verbose` to `debug` logs --- docs/hosting/configuration/environment-variables/logs.md | 2 +- docs/hosting/logging-monitoring/logging.md | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/hosting/configuration/environment-variables/logs.md b/docs/hosting/configuration/environment-variables/logs.md index 479734c0510..5c68ef5142b 100644 --- a/docs/hosting/configuration/environment-variables/logs.md +++ b/docs/hosting/configuration/environment-variables/logs.md @@ -21,7 +21,7 @@ This page lists environment variables to set up logging for debugging. Refer to | Variable | Type | Default | Description | | :------- | :---- | :------- | :---------- | -| `N8N_LOG_LEVEL` | Enum string: `info`, `warn`, `error`, `verbose`, `debug` | `info` | Log output level. Refer to [Log levels](/hosting/logging-monitoring/logging/#log-levels) for details. | +| `N8N_LOG_LEVEL` | Enum string: `info`, `warn`, `error`, `debug` | `info` | Log output level. Refer to [Log levels](/hosting/logging-monitoring/logging/#log-levels) for details. | | `N8N_LOG_OUTPUT` | Enum string: `console`, `file` | `console` | Where to output logs. Provide multiple values as a comma-separated list. | | `N8N_LOG_FILE_COUNT_MAX` | Number | `100` | Max number of log files to keep. | | `N8N_LOG_FILE_SIZE_MAX` | Number | `16` | Max size of each log file in MB. | diff --git a/docs/hosting/logging-monitoring/logging.md b/docs/hosting/logging-monitoring/logging.md index 8bfd23ddbda..1736cf27cf1 100644 --- a/docs/hosting/logging-monitoring/logging.md +++ b/docs/hosting/logging-monitoring/logging.md @@ -16,7 +16,7 @@ To set up logging in n8n, you need to set the following environment variables (y | Setting in the configuration file | Using environment variables | Description | |-----------------------------------|-----------------------------|-------------| -| n8n.log.level | N8N_LOG_LEVEL | The log output level. The available options are (from lowest to highest level) are error, warn, info, verbose, and debug. The default value is `info`. You can learn more about these options [here](#log-levels). | +| n8n.log.level | N8N_LOG_LEVEL | The log output level. The available options are (from lowest to highest level) are error, warn, info, and debug. The default value is `info`. You can learn more about these options [here](#log-levels). | | n8n.log.output | N8N_LOG_OUTPUT | Where to output logs. The available options are `console` and `file`. Multiple values can be used separated by a comma (`,`). `console` is used by default. | | n8n.log.file.location | N8N_LOG_FILE_LOCATION | The log file location, used only if log output is set to file. By default, `/logs/n8n.log` is used. | | n8n.log.file.maxsize | N8N_LOG_FILE_SIZE_MAX | The maximum size (in MB) for each log file. By default, n8n uses 16 MB. | @@ -48,7 +48,6 @@ n8n uses standard log levels to report: - `error`: outputs only errors and nothing else - `warn`: outputs errors and warning messages - `info`: contains useful information about progress -- `verbose`: make n8n output additional information about progress that allows you to further understand what's happening - `debug`: the most verbose output. n8n outputs a lot of information to help you debug issues. @@ -84,10 +83,6 @@ import { // Info-level logging of a trigger function, with workflow name and workflow ID as additional metadata properties Logger.info(`Polling trigger initiated for workflow "${workflow.name}"`, {workflowName: workflow.name, workflowId: workflow.id}); - -// Verbose-level logging of hook function execution, with execution ID, workflow ID, and session ID as metadata properties - -Logger.verbose(`Executing hook (workflowExecuteBefore, hookFunctionsPush)`, {executionId: this.executionId, workflowId: this.workflowData.id, sessionId: this.sessionId}); ``` When creating new loggers, some useful standards to keep in mind are: