<p>Older version of c-lightning used to output the routes in the <code>sendpay</code> command that was used by <code>pay</code> if you look in your log-file you would find something like <code>sendpay via route: us -&gt;</code> which then included information about all the hops, channels, forwarded amounts and cltv_deltas.</p>
<p>Since the new pay plugin it seems indeed that they have changed the log file entries. I have just tried to make a payment and extracted the following from my log file</p>
<pre><code>INFO    plugin-pay: cmd 103109 partid 1: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (reply from remote)
INFO    plugin-pay: cmd 103109 partid 2: failed: WIRE_UNKNOWN_NEXT_PEER (reply from remote)
</code></pre>
<p>around those lines you will actually find more precise information which channels failed which is consistent with their code base at <a href="https://github.com/ElementsProject/lightning/blob/75720ad0e1690052c108fbf457ded807bf09d6c1/lightningd/pay.c#L620" rel="nofollow noreferrer">https://github.com/ElementsProject/lightning/blob/75720ad0e1690052c108fbf457ded807bf09d6c1/lightningd/pay.c#L620</a> says that pay will produce the following log entry:</p>
<pre><code>            log_info(hout-&gt;key.channel-&gt;log,
                 &quot;htlc %&quot;PRIu64&quot; &quot;
                 &quot;failed from %ith node &quot;
                 &quot;with code 0x%04x (%s)&quot;,
                 hout-&gt;key.id,
                 origin_index,
                 failcode, onion_wire_name(failcode));
</code></pre>
<p>However I did not see the exact information in my log file indicating along which routs the payments where attempted with what amounts making the above mentioned log entry less useful. So unless I am completely mistaking I am surprised to write that it seems as if the requested information only exists out of the box in older versions of c-lightning.</p>

CC BY-SA 4.0
2021-08-04T06:23:17.477Z
2021-08-04T06:23:17.477Z
Rene Pickhardt
<p>I want to know how my payment was routed, how many hops, nodes and fees etc. So I can prepare my channels better. I see in the listpays, it contains info like bolt11, destination, payment_hash, but lacks of details.</p>

<lightning-network><core-lightning>
Is is possible to get routing detail of a payment in c-lightning?
A G
# Is is possible to get routing detail of a payment in c-lightning?

(Asked by: username_0 on 2021-08-04)

I want to know how my payment was routed, how many hops, nodes and fees etc. So I can prepare my channels better. I see in the listpays, it contains info like bolt11, destination, payment\_hash, but lacks of details.

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


---

## 1 answers

### Answer by username_1 on 2021-08-04. Score: 2

Older version of c-lightning used to output the routes in the `sendpay` command that was used by `pay` if you look in your log-file you would find something like `sendpay via route: us ->` which then included information about all the hops, channels, forwarded amounts and cltv\_deltas.

Since the new pay plugin it seems indeed that they have changed the log file entries. I have just tried to make a payment and extracted the following from my log file

```
INFO    plugin-pay: cmd 103109 partid 1: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (reply from remote)
INFO    plugin-pay: cmd 103109 partid 2: failed: WIRE_UNKNOWN_NEXT_PEER (reply from remote)

```

around those lines you will actually find more precise information which channels failed which is consistent with their code base at <https://github.com/ElementsProject/lightning/blob/75720ad0e1690052c108fbf457ded807bf09d6c1/lightningd/pay.c#L620> says that pay will produce the following log entry:

```
            log_info(hout->key.channel->log,
                 "htlc %"PRIu64" "
                 "failed from %ith node "
                 "with code 0x%04x (%s)",
                 hout->key.id,
                 origin_index,
                 failcode, onion_wire_name(failcode));

```

However I did not see the exact information in my log file indicating along which routs the payments where attempted with what amounts making the above mentioned log entry less useful. So unless I am completely mistaking I am surprised to write that it seems as if the requested information only exists out of the box in older versions of c-lightning.


---

