Skip to content

Commit 2ee1061

Browse files
conscottniftynei
authored andcommitted
[docs] Add missing 'level' description for listpeers manpage.
1 parent 22921f1 commit 2ee1061

File tree

2 files changed

+42
-4
lines changed

2 files changed

+42
-4
lines changed

doc/lightning-listpeers.7

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: lightning-listpeers
33
.\" Author: [see the "AUTHOR" section]
44
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5-
.\" Date: 12/07/2018
5+
.\" Date: 01/08/2019
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "LIGHTNING\-LISTPEERS" "7" "12/07/2018" "\ \&" "\ \&"
10+
.TH "LIGHTNING\-LISTPEERS" "7" "01/08/2019" "\ \&" "\ \&"
1111
.\" -----------------------------------------------------------------
1212
.\" * Define some portability stuff
1313
.\" -----------------------------------------------------------------
@@ -31,7 +31,7 @@
3131
lightning-listpeers \- Command for returning data on connected lightning nodes\&.
3232
.SH "SYNOPSIS"
3333
.sp
34-
\fBlistpeers\fR [\fIid\fR]
34+
\fBlistpeers\fR [\fIid\fR] [\fIlevel\fR]
3535
.SH "DESCRIPTION"
3636
.sp
3737
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,
4242
.sp
4343
Supplying \fIid\fR will filter the results to only return data on a node with a matching \fIid\fR, if one exists\&.
4444
.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
4547
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"\&.
4648
.sp
4749
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:
123125
: An list of channel id\(cqs open on the peer
124126
.RE
125127
.sp
128+
.RS 4
129+
.ie n \{\
130+
\h'-04'\(bu\h'+03'\c
131+
.\}
132+
.el \{\
133+
.sp -1
134+
.IP \(bu 2.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
126143
If \fIid\fR is supplied and no matching nodes are found, a "peers" object with an empty list is returned\&.
127144
.SH "ERRORS"
128145
.sp
@@ -137,6 +154,18 @@ If \fIid\fR is not a valid public key, an error message will be returned:
137154
.if n \{\
138155
.RE
139156
.\}
157+
.sp
158+
If \fIlevel\fR is not a valid log level, an error message will be returned:
159+
.sp
160+
.if n \{\
161+
.RS 4
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+
.if n \{\
167+
.RE
168+
.\}
140169
.SH "AUTHOR"
141170
.sp
142171
Michael Hawkins <michael\&.hawkins@protonmail\&.com>\&.

doc/lightning-listpeers.7.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ lightning-listpeers - Command for returning data on connected lightning nodes.
88

99
SYNOPSIS
1010
--------
11-
*listpeers* ['id']
11+
*listpeers* ['id'] ['level']
1212

1313
DESCRIPTION
1414
-----------
@@ -25,6 +25,9 @@ or not connected but have open channels with this node, are returned.
2525
Supplying 'id' will filter the results to only return data on a node with a
2626
matching 'id', if one exists.
2727

28+
Supplying 'level' will show log entries related to that peer at the given log
29+
level. Valid log levels are "io", "debug", "info", and "unusual".
30+
2831
If a channel is open with a node and the connection has been lost, then the
2932
node will still appear in the output of the command and the value of the
3033
'connected' attribute of the node will be "false".
@@ -46,6 +49,8 @@ Each object in the list contains the following data:
4649
- 'globalfeatures' : Bit flags showing supported global features (BOLT #9)
4750
- 'localfeatures' : Bit flags showing supported local features (BOLT #9)
4851
- 'channels' : An list of channel id's open on the peer
52+
- 'log' : Only present if 'level' is set. List logs related to the peer at the
53+
specified 'level'
4954

5055
If 'id' is supplied and no matching nodes are found, a "peers" object with an
5156
empty list is returned.
@@ -56,6 +61,10 @@ If 'id' is not a valid public key, an error message will be returned:
5661

5762
{ "code" : -32602, "message" : "'id' should be a pubkey, not '...'" }
5863

64+
If 'level' is not a valid log level, an error message will be returned:
65+
66+
{ "code" : -32602, "message" "'level' should be 'io', 'debug', 'info', or 'unusual', not '...'" }
67+
5968
AUTHOR
6069
------
6170
Michael Hawkins <[email protected]>.

0 commit comments

Comments
 (0)