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

Add peer_id and channel_id explicitly to log records #2314

Merged
merged 9 commits into from
Dec 2, 2023

Commits on Dec 1, 2023

  1. Pass Record by value to Logger

    Instead of passing a reference to a Record, pass the Logger an owned
    Record so that it can be decorated with semantic context.
    henghonglee authored and jkczyz committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    0cba31f View commit details
    Browse the repository at this point in the history
  2. Add semantics to logger::Records

    Include optional peer and channel ids to logger::Record. This will be
    used by wrappers around Logger in order to provide more context (e.g.,
    the peer that sent a message, the channel an operation is pertaining to,
    etc.). Implementations of Logger can include this as metadata to aid in
    searching logs.
    jkczyz committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    a42aeb5 View commit details
    Browse the repository at this point in the history
  3. Add WithContext and Tests

    henghonglee authored and jkczyz committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    973636b View commit details
    Browse the repository at this point in the history
  4. Add WithChannelDetails

    henghonglee authored and jkczyz committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    fa7f2f4 View commit details
    Browse the repository at this point in the history
  5. Add WithChannelContext

    henghonglee authored and jkczyz committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    aa502fe View commit details
    Browse the repository at this point in the history
  6. Add WithChannelMonitor

    henghonglee authored and jkczyz committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    a727cca View commit details
    Browse the repository at this point in the history
  7. Use wrapper to add context to logging

    Using a decorator pattern, add peer_id and channel_id to Record
    stored on Logger.
    henghonglee authored and jkczyz committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    df3ab2e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e6d8f35 View commit details
    Browse the repository at this point in the history
  9. Refactor ChainMonitor::update_channel error case

    Move the handling of ChannelMonitorUpdateStatus::UnrecoverableError to
    the point of error to avoid needing an unwrap later when re-wrapping the
    logger.
    jkczyz committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    e21a500 View commit details
    Browse the repository at this point in the history