Skip to content

Commit 32b725f

Browse files
committed
[FAB-8411] peer logging CLI documentation
This CR adds documentation for the `peer logging` CLI commands. Change-Id: Ibfd47aed74a28855892a2f64515241251c83a4d6 Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
1 parent 3d78ddf commit 32b725f

File tree

1 file changed

+132
-0
lines changed

1 file changed

+132
-0
lines changed

docs/source/commands/peerlogging.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# peer logging
2+
## Description
3+
4+
The `peer logging` subcommand allows administrators to dynamically view and
5+
configure the log levels of a peer.
6+
7+
## Syntax
8+
9+
The `peer logging` subcommand has the following syntax:
10+
11+
```
12+
peer logging getlevel
13+
peer logging setlevel
14+
peer logging revertlevels
15+
```
16+
17+
The different subcommand options (getlevel, setlevel, and revertlevels) relate
18+
to the different logging operations that are relevant to a peer.
19+
20+
Each peer logging subcommand is described together with its options in its own
21+
section in this topic.
22+
23+
## peer logging getlevel
24+
25+
### Get Level Description
26+
27+
The `peer logging getlevel` command allows administrators to get the current
28+
level for a logging module.
29+
30+
### Get Level Syntax
31+
32+
The `peer logging getlevel` command has the following syntax:
33+
34+
```
35+
peer logging getlevel <module-name>
36+
```
37+
38+
### Get Level Flags
39+
40+
The `peer logging getlevel` command does not have any command-specific flags.
41+
42+
### Get Level Usage
43+
44+
Here is an example of the `peer logging getlevel` command:
45+
46+
* To get the log level for module `peer`:
47+
48+
```
49+
peer logging getlevel peer
50+
51+
2018-02-22 19:10:08.633 UTC [cli/logging] getLevel -> INFO 001 Current log level for peer module 'peer': DEBUG
52+
2018-02-22 19:10:08.633 UTC [main] main -> INFO 002 Exiting.....
53+
54+
```
55+
56+
## peer logging setlevel
57+
58+
### Set Level Description
59+
60+
The `peer logging setlevel` command allows administrators to set the current
61+
level for all logging modules that match the module name regular expression
62+
provided.
63+
64+
### Set Level Syntax
65+
66+
The `peer logging setlevel` command has the following syntax:
67+
68+
```
69+
peer logging setlevel <module-name-regular-expression> <log-level>
70+
```
71+
72+
### Set Level Flags
73+
74+
The `peer logging setlevel` command does not have any command-specific flags.
75+
76+
### Set Level Usage
77+
78+
Here are some examples of the `peer logging setlevel` command:
79+
80+
* To set the log level for modules matching the regular expression `peer` to
81+
log level `WARNING`:
82+
83+
```
84+
peer logging setlevel peer warning
85+
2018-02-22 19:14:51.217 UTC [cli/logging] setLevel -> INFO 001 Log level set for peer modules matching regular expression 'peer': WARNING
86+
2018-02-22 19:14:51.217 UTC [main] main -> INFO 002 Exiting.....
87+
88+
```
89+
90+
* To set the log level for modules that match the regular expression `^gossip`
91+
(i.e. all of the `gossip` logging submodules of the form
92+
`gossip/<submodule>`) to log level `ERROR`:
93+
94+
```
95+
peer logging setlevel ^gossip error
96+
97+
2018-02-22 19:16:46.272 UTC [cli/logging] setLevel -> INFO 001 Log level set for peer modules matching regular expression '^gossip': ERROR
98+
2018-02-22 19:16:46.272 UTC [main] main -> INFO 002 Exiting.....
99+
```
100+
101+
## peer logging revertlevels
102+
103+
### Revert Levels Description
104+
105+
The `peer logging revertlevels` command allows administrators to revert the
106+
log levels of all modules to their level at the time the peer completed its
107+
startup process.
108+
109+
### Revert Levels Syntax
110+
111+
The `peer logging revertlevels` command has the following syntax:
112+
113+
```
114+
peer logging revertlevels
115+
```
116+
117+
### Revert Levels Flags
118+
119+
The `peer logging revertlevels` command does not have any command-specific
120+
flags.
121+
122+
### Revert Levels Usage
123+
124+
Here is an example of the `peer logging revertlevels` command:
125+
126+
* ```
127+
peer logging revertlevels
128+
129+
2018-02-22 19:18:38.428 UTC [cli/logging] revertLevels -> INFO 001 Log levels reverted to the levels at the end of peer startup.
130+
2018-02-22 19:18:38.428 UTC [main] main -> INFO 002 Exiting.....
131+
132+
```

0 commit comments

Comments
 (0)