You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lightning-listpeers \- Command for returning data on connected lightning nodes\&.
32
32
.SH "SYNOPSIS"
33
33
.sp
34
-
\fBlistpeers\fR [\fIid\fR]
34
+
\fBlistpeers\fR [\fIid\fR] [\fIlevel\fR]
35
35
.SH "DESCRIPTION"
36
36
.sp
37
37
The \fBlistpeers\fR RPC command returns data on nodes that are connected or are not connected but have open channels with this node\&.
@@ -42,6 +42,8 @@ If no \fIid\fR is supplied, then data on all lightning nodes that are connected,
42
42
.sp
43
43
Supplying \fIid\fR will filter the results to only return data on a node with a matching \fIid\fR, if one exists\&.
44
44
.sp
45
+
Supplying \fIlevel\fR will show log entries related to that peer at the given log level\&. Valid log levels are "io", "debug", "info", and "unusual"\&.
46
+
.sp
45
47
If a channel is open with a node and the connection has been lost, then the node will still appear in the output of the command and the value of the \fIconnected\fR attribute of the node will be "false"\&.
46
48
.sp
47
49
The channel will remain open for a set blocktime, after which if the connection has not been re\-established, the channel will close and the node will no longer appear in the command output\&.
@@ -123,6 +125,21 @@ Each object in the list contains the following data:
123
125
: An list of channel id\(cqs open on the peer
124
126
.RE
125
127
.sp
128
+
.RS4
129
+
.ien\{\
130
+
\h'-04'\(bu\h'+03'\c
131
+
.\}
132
+
.el\{\
133
+
.sp-1
134
+
.IP\(bu2.3
135
+
.\}
136
+
\fIlog\fR
137
+
: Only present if
138
+
\fIlevel\fR
139
+
is set\&. List logs related to the peer at the specified
140
+
\fIlevel\fR
141
+
.RE
142
+
.sp
126
143
If \fIid\fR is supplied and no matching nodes are found, a "peers" object with an empty list is returned\&.
127
144
.SH "ERRORS"
128
145
.sp
@@ -137,6 +154,18 @@ If \fIid\fR is not a valid public key, an error message will be returned:
137
154
.ifn\{\
138
155
.RE
139
156
.\}
157
+
.sp
158
+
If \fIlevel\fR is not a valid log level, an error message will be returned:
159
+
.sp
160
+
.ifn\{\
161
+
.RS4
162
+
.\}
163
+
.nf
164
+
{ "code" : \-32602, "message" "\*(Aqlevel\*(Aq should be \*(Aqio\*(Aq, \*(Aqdebug\*(Aq, \*(Aqinfo\*(Aq, or \*(Aqunusual\*(Aq, not \*(Aq\&.\&.\&.\*(Aq" }
165
+
.fi
166
+
.ifn\{\
167
+
.RE
168
+
.\}
140
169
.SH "AUTHOR"
141
170
.sp
142
171
Michael Hawkins <michael\&.hawkins@protonmail\&.com>\&.
0 commit comments