Logger in n8n

hi, is there a tool in n8n that I can do logging to review it later?
i want to log failed or success of workflow and also log when javascript that I run in workflow failed

Hey @Asaf_Shay, this would be covered by the executions list in n8n. Make sure to save failed or successful workflow executions as needed (this can be configured in your workflow settings). These executions can then be viewed via the Executions List available in the sidebar:


In addition, you can also configure server logging as described here: Logging in n8n | Docs

if I want to put text in log when my javascript running(inside node function)how can I achieve this?
another thing, you said that I can save log in server side, first what error I can get from the server, I am asking because if the server is not running meaning the problem is with n8n, second beside to show the message in cmd window (server side) is there somewhere else that I can show the log(assume the window is close or the machine is close)

Hey @Asaf_Shay,

The text logging we provide is the same output you would see in the console window so it would show some node issues or service issues if it can’t start for some reason. To view those you could access them from the server itself or you could use something like Splunk or Loki to feed the output into another system that you can monitor / set up alerting on.

If you are running javascript in your node and want to write to a file you would need to create a function to do that or if you are catching errors you could return the error in the normal output format then do an if to check for an error flag and use the execute command to echo / print the error message to a file. You could also do this with an error workflow but it does all depend on what you actually want to achieve with logging :slight_smile:

I didn’t understand where to see logs, my goal is to record all errors in the console, I can write the logs to file on the file system, my Q is there such option in n8n to see the logs, even if I restart the machine I want to be able see the logs