getlog

getlog -- Command to show recent 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.
    • node_id (pubkey, optional): The peer this is associated with.
    • data (hex, optional): The IO which occurred.

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": "1738000000.000000000",
  "bytes_used": 3271748,
  "bytes_max": 16777216,
  "log": [
    {
      "type": "UNUSUAL",
      "time": "0.000000000",
      "source": "plugin-bookkeeper",
      "log": "topic 'utxo_deposit' is not a known notification topic",
      "num_skipped": 177
    },
    {
      "type": "UNUSUAL",
      "time": "0.000000000",
      "source": "plugin-bookkeeper",
      "log": "topic 'utxo_spend' is not a known notification topic"
    },
    {
      "type": "UNUSUAL",
      "time": "0.000000000",
      "node_id": "038194b5f32bdf0aa59812c86c4ef7ad2f294104fa027d1ace9b469bb6f88cf37b",
      "source": "chan#1",
      "log": "No peer channel with scid=7984345x7385111x15166",
      "num_skipped": 4562
    },
    {
      "type": "UNUSUAL",
      "time": "0.000000000",
      "node_id": "03cecbfdc68544cc596223b68ce0710c9e5d2c9cb317ee07822d95079acc703d31",
      "source": "chan#2",
      "log": "Peer permanent failure in CLOSINGD_COMPLETE: Funding transaction spent: onchain txid dc446777a9b3d6d5962f502f5d22f66b01452389c1bbe8460491e7376f44a1eb (reason=unknown)",
      "num_skipped": 4554
    },
    {
      "type": "UNUSUAL",
      "time": "0.000000000",
      "node_id": "03cecbfdc68544cc596223b68ce0710c9e5d2c9cb317ee07822d95079acc703d31",
      "source": "chan#2",
      "log": "Not dropping our unilateral close onchain since we already saw dc446777a9b3d6d5962f502f5d22f66b01452389c1bbe8460491e7376f44a1eb confirm."
    }
  ]
}

Core Lightning is Blockstream's open-source implementation of the Lightning Network optimised for performance. It is highly customizable through modular expandability.

© 2026 Core Lightning, a Blockstream project.
All rights reserved.

X Twitter Logo Streamline Icon: https://streamlinehq.com

X

The official Core Lightning X(Twitter) handle to follow project updates and announcements.

Github Logo 2 Streamline Icon: https://streamlinehq.com

Github

Github repository for source code, issues, and contributions. Visit our project here to explore or contibute.

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/V6ay9yNhBQ to join.