lightning-getlog

lightning-getlog -- Command to show logs.

SYNOPSIS

getlog [level]

DESCRIPTION

The getlog the RPC command to show logs, with optional log level.

  • level (string, optional) (one of "broken", "unusual", "info", "debug", "trace", "io"): A string that represents the log level. The default is info.

RETURN VALUE

On success, an object is returned, containing:

  • created_at (string): UNIX timestamp with 9 decimal places, when logging was initialized.

  • bytes_used (u32): The number of bytes used by logging records.

  • bytes_max (u32): The bytes_used values at which records will be trimmed .

  • log (array of objects):

    • type (string) (one of "SKIPPED", "BROKEN", "UNUSUAL", "INFO", "DEBUG", "TRACE", "IO_IN", "IO_OUT")

    If type is "SKIPPED":

    • num_skipped (u32): Number of unprinted log entries (deleted or below level parameter).

    If type is "BROKEN", "UNUSUAL", "INFO", "DEBUG" or "TRACE":

    • time (string): UNIX timestamp with 9 decimal places after created_at.
    • source (string): The particular logbook this was found in.
    • log (string): The actual log message.
    • node_id (pubkey, optional): The peer this is associated with.

    If type is "IO_IN" or "IO_OUT":

    • time (string): Seconds after created_at, with 9 decimal places.
    • source (string): The particular logbook this was found in.
    • log (string): The associated log message.
    • data (hex): The IO which occurred.
    • node_id (pubkey, optional): The peer this is associated with.

ERRORS

On failure, one of the following error codes may be returned:

  • -32602: Error in given parameters.

AUTHOR

Vincenzo Palazzo <[email protected]> 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

EXAMPLES

Example 1:

Request:

lightning-cli getlog -k "level"="unusual"
{
  "id": "example:getlog#1",
  "method": "getlog",
  "params": {
    "level": "unusual"
  }
}

Response:

{
  "created_at": "1722303623.956237697",
  "bytes_used": 1723719,
  "bytes_max": 10485760,
  "log": [
    {
      "type": "SKIPPED",
      "num_skipped": 2927
    },
    {
      "type": "UNUSUAL",
      "time": "59.598510878",
      "node_id": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518",
      "source": "chan#1",
      "log": "No peer channel with scid=6250403x3681116x19863"
    },
    {
      "type": "SKIPPED",
      "num_skipped": 1183
    },
    {
      "type": "UNUSUAL",
      "time": "71.923794351",
      "node_id": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d",
      "source": "chan#2",
      "log": "Peer permanent failure in CLOSINGD_COMPLETE: Funding transaction spent (reason=unknown)"
    },
    {
      "type": "SKIPPED",
      "num_skipped": 557
    },
    {
      "type": "BROKEN",
      "time": "89.108598990",
      "source": "plugin-topology",
      "log": "DEPRECATED API USED: listchannels.include_private by \\\"-c:listchannels#114/cln:listchannels#175\\\""
    },
    {
      "type": "SKIPPED",
      "num_skipped": 1246
    },
    {
      "type": "UNUSUAL",
      "time": "95.217065000",
      "source": "plugin-cln-renepay",
      "log": "Failed to update hint channel 111x1x0: Failed to update scid=111x1x0 in the local_gossmods."
    },
    {
      "type": "SKIPPED",
      "num_skipped": 1696
    }
  ]
}

Core Lightning (previously c-lightning) is a lightweight, highly customizable and standard compliant implementation of the Lightning Network protocol.

© 2023 Core Lightning
All rights reserved.

Discussion Forum

The official Core Lightning forum is hosted at discuss.corelightning.org

BuildonL2 Community

The official BuildOnL2 community lives at community.corelightning.org. Join us and build the future of bitcoin on lightning.

Mailing List

For general discussions about CLN implementation, use [email protected]. For the Lightning Network, use [email protected]

Telegram

Community-driven telegram group where most of the node operators hang out. Go to https://t.me/lightningd to join.

Discord

Community-driven discord server where the devs flock together. Go to https://discord.gg/w27fMFESMN to join.

Internet Relay Chat

Don't hesitate to reach out to us on IRC at #lightning-dev @ libera.chat, #c-lightning @ libera.chat.