How to capture c-lightining logs?

2

Where does c-lightning save its debug.log file? I know you can run the lightning daemon with --log-level=debug and access the logs in the terminal. But, I run my node on a remote server and I access it via SSH and sometimes when my internet connection goes off for a second on the machine which I am accessing through, my SSH client times out. I was wondering if there is a location where c-lightning saves all these logs just like how Bitcoin-core saves its debug.log file in ~/.bitcoin folder.

Ugam Kamat

Posted 2019-09-08T12:27:54.147

Reputation: 5 180

Answers

2

C-lightning does not save logs by default. One can ensure that the logs are saved to the drive by including log-file=<file_name>.log in the config file. When staring lightningd you can include the level of logs that the file has to capture by including --log-level=LEVEL, where LEVEL can be io, debug, info, unusual, or broken.

Ugam Kamat

Posted 2019-09-08T12:27:54.147

Reputation: 5 180

2As all command line arguments to lightningd these can also be stored as key value pairs in a config file which is either called config and stored in your lightning dir (by default at ~/.lightning) or is passed as an argument to lightningdRene Pickhardt 2019-09-08T14:52:00.717