Hi there!
we’re evaluating n8n to see if it is the right fit for our use case in validating the errors. We’ve taken a look at Logging - n8n Documentation and have a few questions:
Our n8n worker logs are pushed to our Internal alert management system/tool and there we are trying to setup monitorings as and when a workflow gets failed during its execution. Upon trying to setup the monitoring via our internal tool, we see a requirement to update/rename the fields as they are reserved keyworks in our Internal tool.
Eg : We wanted to rename the JSON fields like “Error”,“Message” etc…
Sample output log:
{“level”:“verbose”,“message”:“Workflow execution finished with error”,“metadata”:{“error”:{“cause”:{“message”:“404 - “””,“name”:“Error”,“stack”:“Error: Request failed with status code 404\n at createError (/usr/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (events.js:412:35)\n at IncomingMessage.emit (domain.js:475:12)\n at endReadableNT (internal/streams/readable.js:1333:12)\n at processTicksAndRejections (internal/process/task_queues.js:82:21)”},“description”:“404 - “””,“httpCode”:“404”,“message”:“The resource you are requesting could not be found”,“name”:“NodeApiError”,“node”:{“credentials”:{“freshserviceApi”:{“id”:“165”,“name”:“noc-alerts cleanup”}},“name”:“GET ticket”,“parameters”:{“operation”:“get”,“resource”:“ticket”,“ticketId”:"={{$json[“body”][“freshdesk_webhook”][“ticket_id”].split()[1]}}"},“position”:[-940,-40],“type”:“n8n-nodes-base.freshservice”,“typeVersion”:1},“stack”:"NodeApiError: The resource you are requesting could not be found\n at Object.freshserviceApiRequest (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-
Questions :
- Is it really possible to rename these fields ?
- Currently, we use “Verbose” as the log level, does any other log level options gives better log output with json values ?