Configure Logging
This guide will show you how to enable logging on your Cardano nodes.
By default, the node config.json we downloaded will need some adjustment in order for us to collect logs and enable us to troubleshoot our nodes more effectively. In the following instructions we are going to have cardano-node output logs to a file in a directory we setup earlier. This needs to be done on ALL nodes. Also, remember that this is an educational exercise and does not contain recommendations or instructions on production setups.
There are a couple of modifications we need to make to our config.json to get logging to work.
First, let's open our config.json with a text editor.
nano ~/preprodnet/config/config.jsonWhile there are a large number of configurable items in this file, we need to familiarize ourselves with it to effectively operate nodes/pool.

Add the Enable Logging line to our config. Unless adding to the end of the list, please remember to end the line with a comma.
The next change we are going to make is to enable FileSK as a default scribe. This allows the node to use FileSK as a scribe output.

Let's edit your defaultScribes section to match the following.
Lastly, we will configure the "setupScribes" to tell the node which scribe we are using and where our logs will go.

Change your file to match the following.
Save the config file and exit. Then restart your node.
To ensure that our node is correctly writing log output the way we want let's monitor the log file with the tail command.

Last updated