2.0 KiB
Logging and Log Rotation
Each BigchainDB node runs:
- MongoDB
- BigchainDB Server
- Tendermint
When running a BigchainDB node for long periods of time, we need to consider doing log rotation, i.e. we do not want the logs taking up large amounts of storage and making the node unresponsive or getting it into a bad state.
MongoDB Logging and Log Rotation
See the MongoDB docs about logging and log rotation.
BigchainDB Server Logging and Log Rotation
BigchainDB Server writes its logs to the files:
bigchaindb.logbigchaindb-errors.logbigchaindb-benchmark.log
The default is for those files to be created in the same directory where you ran bigchaindb start.
If you started BigchainDB Server and Tendermint using Monit, as suggested by our guide on
How to Set Up a BigchainDB Network,
then the logs will be written to $HOME/.bigchaindb-monit/logs/.
Log rotation is baked into BigchainDB Server using Python's logging module.
The logs for BigchainDB Server are rotated when any of the above mentioned files exceeds 209715200 bytes (i.e. approximately 209 MB).
Tendermint Logging and Log Rotation
Tendermint writes its logs to the files:
tendermint.out.logtendermint.err.log
If you started BigchainDB Server and Tendermint using Monit, as suggested by our guide on
How to Set Up a BigchainDB Network,
then the logs will be written to $HOME/.bigchaindb-monit/logs/.
Moreover, if you started BigchainDB Server and Tendermint using Monit, then Monit monitors the Tendermint log files. Tendermint logs are rotated if any of the above mentioned log files exceeds 200 MB.