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

CC BY-SA 4.0
2019-09-08T14:52:00.717Z
As 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 lightningd
Rene Pickhardt
CC BY-SA 4.0
2019-09-08T14:39:32.787Z
2019-09-08T14:39:32.787Z
Ugam Kamat
<p>Where does c-lightning save its debug.log file? I know you can run the lightning daemon with <code>--log-level=debug</code> 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 <code>~/.bitcoin</code> folder.</p>

<lightning-network><core-lightning>
How to capture c-lightining logs?
Ugam Kamat
# How to capture c-lightining logs?

(Asked by: username_0 on 2019-09-08)

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.

**Tags:** lightning-network, core-lightning


---

## 1 answers

### Answer by username_0 on 2019-09-08. Score: 3 | Accepted answer

C-lightning does not save logs by default. One can ensure that the logs are saved to the drive by including `log-file=.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`.

> **Comments:**
> **username_1**: As 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 lightningd  

---

