Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per file log levels #6406

Merged

Commits on Jul 16, 2023

  1. lightningd/log: clean up nomenclature.

    `struct log` becomes `struct logger`, and the member which points to the
    `struct log_book` becomes `->log_book` not `->lr`.
    
    Also, we don't need to keep the log_book in struct plugin, since it has
    access to ld's log_book.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    c11f60d View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2023

  1. lightningd: add "has_io_logging" helper.

    Rather than exposing the filtering internals.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    e86ffff View commit details
    Browse the repository at this point in the history
  2. lightningd: have opt_log_level take the log_book.

    This is where it's set, not some random logger.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    56bee9e View commit details
    Browse the repository at this point in the history
  3. lightningd: keep linked list of all loggers.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    6916350 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2023

  1. lightningd: clean up logging initializations.

    Rather than initializating the "print_level" field on first use, we can
    do it in logging_options_parsed(), now we have a linked list of them.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    73cb22b View commit details
    Browse the repository at this point in the history
  2. lightningd: add support for per-logfile filters.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    e44a017 View commit details
    Browse the repository at this point in the history
  3. lightningd: extend log-level to support filter per-file.

    Fixes: ElementsProject#5392
    Changelog-Added: config: `log-level` can be specified on a per-logfile basis.
    rustyrussell committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    79772a3 View commit details
    Browse the repository at this point in the history
  4. lightningd: fix up log filtering for generic daemons (e.g. connectd).

    Without this, only per-peer daemons were filtered correctly.  For generic
    daemons, we need to filter with the actual nodeid they use (if any).
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Changelog-Fixed: config: `log-level` filters now apply correctly to messages from `connectd`.
    rustyrussell committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    f2a6d8d View commit details
    Browse the repository at this point in the history