# Functions
ClosureAttr returns an slog attribute that will only perform the given logging operation if the corresponding log level is enabled.
Fmt returns a slog.Attr with the formatted message which is only computed when needed.
Hex is a convenience function for hex-encoded log attributes.
Hex6 is a convenience function for hex-encoded log attributes which prints a maximum of 6 bytes.
LevelFromString returns a level based on the input string s.
NewClosure returns a new closure over a function that returns a string which itself provides a Stringer interface so that it can be used with the logging system.
NewDefaultHandler creates a new Handler that can be used along with NewSLogger to instantiate a structured logger.
NewSLogger constructs a new structured logger from the given Handler.
Sprintf returns a fmt.Stringer that will lazily compute the string when needed.
WithCallerFlags can be used to overwrite the default caller flag option.
WithCallSiteSkipDepth can be used to set the call-site skip depth.
WithCtx returns a copy of the context with which the logging attributes are associated.
WithNoTimestamp is an option that can be used to omit timestamps from the log lines.
WithStyledCallSite can be used adjust the call-site string before it is printed.
WithStyledKeys can be used adjust the key strings for any key-value attribute pair.
WithStyledLevel can be used adjust the level string before it is printed.
WithTimeSource can be used to overwrite the time sourced from the slog Record.
# Constants
DefaultSkipDepth is the default number of stack frames to ascend when determining the call site of a log.
Redefine the levels here so that any package importing the original btclog Level does not need to import both the old and new modules.
Redefine the levels here so that any package importing the original btclog Level does not need to import both the old and new modules.
Redefine the levels here so that any package importing the original btclog Level does not need to import both the old and new modules.
Redefine the levels here so that any package importing the original btclog Level does not need to import both the old and new modules.
Redefine the levels here so that any package importing the original btclog Level does not need to import both the old and new modules.
Redefine the levels here so that any package importing the original btclog Level does not need to import both the old and new modules.
Redefine the levels here so that any package importing the original btclog Level does not need to import both the old and new modules.
Llongfile modifies the logger output to include full path and line number of the logging callsite, e.g.
Lshortfile modifies the logger output to include filename and line number of the logging callsite, e.g.
# Variables
Disabled is a Logger that will never output anything.
# Structs
DefaultHandler is a Handler that can be used along with NewSLogger to instantiate a structured logger.
# Type aliases
Closure is used to provide a closure over expensive logging operations so that they don't have to be performed when the logging level doesn't warrant it.
HandlerOption is the signature of a functional option that can be used to modify the behaviour of the DefaultHandler.