package
18.0.0-dev.vnet-windows.4+incompatible
Repository: https://github.com/gravitational/teleport.git
Documentation: pkg.go.dev

# Functions

Initialize configures the default global logger based on the provided configuration.
NewFileSharedWriter wraps the provided [os.File] in a writer that is thread safe, with ability to enable filesystem notification watch and reopen file on specific events.
NewPackageLogger creates a [slog.Logger] that defers setting any groups or attributes until the first use of the logger.
NewSlogJSONHandler creates a SlogJSONHandler that outputs to w.
NewSlogTextHandler creates a SlogTextHandler that writes messages to w.
NewSyslogWriter creates a writer that outputs to the local machine syslog.
NewWriterFinalizer wraps the provided writer [io.WriteCloser] to trigger Close function after writer is unassigned from any variable.
StringerAttr creates a [slog.LogValuer] that will defer to the provided [fmt.Stringer].
TypeAttr creates a lazily evaluated log value that presents the pretty type name of a value as a string.
ValidateFields ensures the provided fields map to the allowed fields.

# Constants

CallerField is the log field that stores the calling file and line number.
ComponentField is the log field that stores the calling component.
LevelField is the log field that stores the verbosity.
TimestampField is the field that stores the timestamp the log was emitted.
TraceLevel is the logging level when set to Trace verbosity.
TraceLevelText is the text representation of Trace verbosity.

# Variables

ErrFileSharedWriterClosed is returned when file shared writer is already closed.
SupportedLevelsText lists the supported log levels in their text representation.

# Structs

Config configures teleport logging.
DiscardHandler is a [slog.Handler] that discards all messages.
FileSharedWriter is similar to SharedWriter except that it requires a `os.File` instead of a `io.Writer`.
SlogJSONHandler is a [slog.Handler] that outputs messages in a json format per the config file.
SlogJSONHandlerConfig allows the SlogJSONHandler functionality to be tweaked.
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.
WriterFinalizer is a wrapper for the [io.WriteCloser] to automate resource cleanup.