LIGHTNING-GETLOG(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

πŸ’… getlog β€” LIGHTNING-GETLOG(7)

okay so bestie, welcome to LIGHTNING-GETLOG(7) πŸŽ€ β€” the manual page that tells you all about getlog, the command that shows you recent logs. yes, like actually shows you what your node has been up to. it's giving detective energy πŸ”βœ¨


✨ SYNOPSIS ✨

getlog [level]

🌸 DESCRIPTION 🌸

getlog is the RPC command that shows logs, and it takes an optional log level. simple as that, no cap 🫢

  • level (string, optional) (one of "broken", "unusual", "info", "debug", "trace"): a string that represents the log level. and heads up β€” io is not accepted here 🚫; io logs are available only in the log file, via log-level=io. the default is info.
fr fr remember: no io in this parameter. the log file is the only place those show up. iykyk πŸ’€

πŸ‘‘ 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). lowkey tragic, they got skipped 😭

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. (basically: check ur params bestie πŸ™ˆ)

🌈 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. iconic behavior, honestly πŸ‘‘βœ¨


🧚 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,
  "bytes_used": 1630000,
  "bytes_max": 10485760,
  "log": [
    {
      "type": "SKIPPED",
      "num_skipped": 144
    },
    {
      "type": "UNUSUAL",
      "time": "71.800000000",
      "source": "plugin-bookkeeper",
      "log": "topic 'utxo_deposit' is not a known notification topic"
    },
    {
      "type": "UNUSUAL",
      "time": "72.800000000",
      "source": "plugin-bookkeeper",
      "log": "topic 'utxo_spend' is not a known notification topic"
    },
    {
      "type": "SKIPPED",
      "num_skipped": 147
    },
    {
      "type": "UNUSUAL",
      "time": "74.800000000",
      "node_id": "nodeid010101010101010101010101010101010101010101010101010101010101",
      "source": "chan#1",
      "log": "No peer channel with scid=228x1x1"
    }
  ]
}

okay that's the whole page!! mwah πŸ’‹ this was Core Lightning v26.06.9, and the page itself is LIGHTNING-GETLOG(7) β€” go forth and read ur logs, bestie πŸŒŸπŸ’œ

πŸ“¦ where this page comes from