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

Switch logging to hclog #685

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 25, 2023

  1. Switch logging to hclog

    Currently, serf takes a standard lib log.Logger. This makes using serf
    as a library a bit weird because you have to have a logger that may produce
    output in a different format to your main binary. There are ways to hack around
    this, e.g. by using a log.Logger that writes to some intermediate buffer that parses
    the log output, but this loses a lot of context that we would otherwise have.
    
    In this commit, we swap serf over to taking an hclog.Logger instead. As an
    interface, this means that library consumers can use whatever logger they
    want, and we can use hclog's built-in support for log levels and structured
    logging.
    
    Signed-off-by: sinkingpoint <colin@quirl.co.nz>
    sinkingpoint committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    16167d8 View commit details
    Browse the repository at this point in the history