2020-08-26 14:43:56 +02:00
lightning-getlog -- Command to show logs.
=========================================
SYNOPSIS
--------
2022-01-26 18:18:49 +01:00
**getlog** [*level*]
2020-08-26 14:43:56 +02:00
DESCRIPTION
-----------
The **getlog** the RPC command to show logs, with optional log *level* .
2020-09-07 12:46:28 +02:00
- *level*: A string that represents the log level (*broken*, *unusual* , *info* , *debug* , or *io* ). The default is *info* .
2020-08-26 14:43:56 +02:00
EXAMPLE JSON REQUEST
--------------------
```json
{
"id": 82,
"method": "getlog",
"params": {
"level": "debug"
}
}
```
RETURN VALUE
------------
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
2022-09-05 23:33:09 +02:00
2022-09-05 23:45:06 +02:00
- **created\_at** (string): UNIX timestamp with 9 decimal places, when logging was initialized
- **bytes\_used** (u32): The number of bytes used by logging records
2023-01-10 00:51:01 +01:00
- **bytes\_max** (u32): The bytes\_used values at which records will be trimmed
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
- **log** (array of objects):
2022-11-11 03:03:13 +01:00
- **type** (string) (one of "SKIPPED", "BROKEN", "UNUSUAL", "INFO", "DEBUG", "IO\_IN", "IO\_OUT")
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
If **type** is "SKIPPED":
2022-09-05 23:33:09 +02:00
2022-09-05 23:45:06 +02:00
- **num\_skipped** (u32): number of unprinted log entries (deleted or below *level* parameter)
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
If **type** is "BROKEN", "UNUSUAL", "INFO" or "DEBUG":
2022-09-05 23:33:09 +02:00
2022-11-11 03:03:13 +01:00
- **time** (string): UNIX timestamp with 9 decimal places after **created\_at**
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
- **source** (string): The particular logbook this was found in
- **log** (string): The actual log message
2022-09-05 23:45:06 +02:00
- **node\_id** (pubkey, optional): The peer this is associated with
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
2022-11-11 03:03:13 +01:00
If **type** is "IO\_IN" or "IO\_OUT":
2022-09-05 23:33:09 +02:00
2022-11-11 03:03:13 +01:00
- **time** (string): Seconds after **created\_at** , with 9 decimal places
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
- **source** (string): The particular logbook this was found in
- **log** (string): The associated log message
- **data** (hex): The IO which occurred
2022-09-05 23:45:06 +02:00
- **node\_id** (pubkey, optional): The peer this is associated with
2021-09-03 12:07:59 +02:00
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
[comment]: # (GENERATE-FROM-SCHEMA-END)
2020-08-26 14:43:56 +02:00
On failure, one of the following error codes may be returned:
2020-08-31 14:42:28 +02:00
- -32602: Error in given parameters.
2020-08-26 14:43:56 +02:00
EXAMPLE JSON RESPONSE
---------------------
```json
{
"created_at": "1598192543.820753463",
"bytes_used": 89285843,
"bytes_max": 104857600,
"log": [
{
"type": "SKIPPED",
"num_skipped": 45
},
{
"type": "INFO",
"time": "0.453627568",
"source": "plugin-autopilot.py",
"log": "RPC method 'autopilot-run-once' does not have a docstring."
}
]
}
```
AUTHOR
------
Vincenzo Palazzo < < vincenzo.palazzo @ protonmail . com > > wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command.
RESOURCES
---------
Main web site: < https: / / github . com / ElementsProject / lightning >
2022-12-09 08:10:12 +01:00
2023-01-30 07:24:16 +01:00
[comment]: # ( SHA256STAMP:5f9808f93c2ec66048455dbda7e59d3afa793559a330a50ba48c3ba66cead7d6)