package
0.0.0-20250306163500-5f3bb2705e1f
Repository: https://github.com/versoriumx/teleport.git
Documentation: pkg.go.dev
# Functions
NewDefaultTextFormatter creates a TextFormatter with the default options set.
NewSharedWriter wraps the provided [io.Writer] in a writer that is thread safe.
NewSlogJSONHandler creates a SlogJSONHandler that outputs to w.
NewSlogTextHandler creates a SlogTextHandler that writes messages to w.
NewTestJSONFormatter creates a JSONFormatter that is configured for output in tests.
SlogLevelToLogrusLevel converts a [slog.Level] to its equivalent [logrus.Level].
# Constants
TraceLevel is the logging level when set to Trace verbosity.
# Structs
JSONFormatter implements the [logrus.Formatter] interface and adds extra fields to log entries.
SharedWriter is an [io.Writer] implementation that protects writes with a mutex.
SlogJSONHandler is a [slog.Handler] that outputs messages in a json format per the config file.
SlogTextHandler is a [slog.Handler] that outputs messages in a textual manner as configured by the Teleport configuration.
SlogTextHandlerConfig allow the SlogTextHandler functionality to be tweaked.
TextFormatter is a [logrus.Formatter] that outputs messages in a textual format.