Log

Search process log

Method

1log.search

Parameters

Name Type Description Required
id string / number The identifier of the request. Yes
jsonrpc string The protocol version. Yes
method string The method name. Yes
params object The parameters of the request. Yes
params.dateFrom number Date from as unix timestamp (s). No
params.dateTo number Date to as unix timestamp (s). No
params.levels string[] Log levels. No
params.processes string[] Process names. No
params.searchTerm string Search term. No
params.limit string Max number of results. No
params.offset string Offset results. No
params.order string Order results (DESC). No

Result

Name Type Description Required
id string / number The identifier of the request. Yes
jsonrpc string The protocol version. Yes
result array Result. Yes
result.id string Log id. Yes
result.process string Process name. Yes
result.level string Log level. Yes
result.content string Log content. Yes
result.timestamp number Unix timestamp (s). Yes

Request

1{
2 "id": "unique-request-id",
3 "jsonrpc": "2.0",
4 "method": "log.log",
5 "params": {
6 "dateFrom": 1605657600,
7 "dateTo": 1705657600,
8 "levels": ["info"],
9 "processes": ["core"],
10 "searchTerm": "search term",
11 "limit": 10,
12 "offset": 0,
13 "order": "ASC",
14 }
15}

Response

1{
2 "id": "unique-request-id",
3 "jsonrpc": "2.0",
4 "result": {
5 total: 2000,
6 limit: 10,
7 offset: 0
8 data: [
9 {
10 "id": 1,
11 "process": "core",
12 "level": "info",
13 "content": "Connecting to database: ark_testnet",
14 "timestamp": 1605705110,
15 },
16 {
17 "id": 2,
18 "level": "debug",
19 "content": "Connection established.",
20 "timestamp": 1605705110,
21 }
22 ]
23 }
24}

Generate log archive

Method

1log.download

Parameters

Name Type Description Required
id string / number The identifier of the request. Yes
jsonrpc string The protocol version. Yes
method string The method name. Yes
params object The parameters of the request. Yes
params.dateFrom number Date from as unix timestamp (s). Yes
params.dateTo number Date to as unix timestamp (s). Yes
params.levels string[] Log levels. No
params.processes string[] Process names. No

Result

Name Type Description Required
id string / number The identifier of the request. Yes
jsonrpc string The protocol version. Yes
result string Generated file name. Yes

Request

1{
2 "id": "unique-request-id",
3 "jsonrpc": "2.0",
4 "method": "log.log",
5 "params": {
6 "dateFrom": 1605657600,
7 "dateTo": 1705657600,
8 "levels": ["info", "debug"],
9 "processes": ["core"]
10 }
11}

Response

1{
2 "id": "unique-request-id",
3 "jsonrpc": "2.0",
4 "result": "2020-12-14_17-38-00.log.gz"
5}

Get archived logs

Method

1log.archived

Parameters

Name Type Description Required
id string / number The identifier of the request. Yes
jsonrpc string The protocol version. Yes
method string The method name. Yes
params object The parameters of the request. Yes

Result

Name Type Description Required
id string / number The identifier of the request. Yes
jsonrpc string The protocol version. Yes
result array Result. Yes
result.name string Log file name. Yes
result.size number Log file size (KB). Yes
result.downloadLink string Download link. Get file via standard HTTP GET request. Yes

Request

1{
2 "id": "unique-request-id",
3 "jsonrpc": "2.0",
4 "method": "log.archived",
5 "params": {}
6}

Response

1{
2 "id": "unique-request-id",
3 "jsonrpc": "2.0",
4 "result": [
5 {
6 "name": "2020-12-14_17-38-00.log.gz",
7 "size": 2,
8 "downloadLink": "http://127.0.0.1:4003/log/archived/2020-12-14_17-38-00.log.gz"
9 },
10 {
11 "name": "2020-12-15_12-38-12.log.gz",
12 "size": 2766,
13 "downloadLink": "http://127.0.0.1:4003/log/archived/2020-12-15_12-38-12.log.gz"
14 }
15 ]
16}
Last updated 3 years ago
Edit Page
Share: