package
0.0.0-20250224221724-fc8adcb1fe8e
Repository: https://github.com/mongodb/grip.git
Documentation: pkg.go.dev

# Functions

DevNullAppender returns a configured stream logger Sender instance that writes messages to dev null.
FormatLog provides compatibility with the original slogger implementation.
LevelFilter provides compatibility with a legacy slogger implementation that filgered messages lower than the specified priority.
NewAppenderSender implements the send.Sender interface, which allows it to be used as a grip backend, but the it's mode of action is to use a slogger.Appender.
NewLog takes a message.Composer object and returns a slogger.Log instance (which also implements message.Composer).
NewPrefixedLog allows you to construct a slogger.Log message from a message composer, while specifying a prefix.
NewStackError produces a StackError object, collecting the stacktrace and building a Formatted message composer (e.g.
NewStringAppender wraps a bytes.Buffer and provides an send.Sender/Appender interface that writes log messages to that buffer.
StdErrAppender returns a configured stream logger Sender instance that writes messages to standard error.
StdOutAppender returns a configured stream logger Sender instance that writes messages to standard output.
WrapAppender takes an Appender instance and returns a send.Sender instance that wraps it.

# Constants

slogger has its own system of priorities/log levels.
slogger has its own system of priorities/log levels.
slogger has its own system of priorities/log levels.
slogger has its own system of priorities/log levels.
slogger has its own system of priorities/log levels.

# Structs

Log is a representation of a logging event, which matches the structure and interface of the original slogger Log type.
Logger is a type that represents a single log instance.
SenderAppender is a shim that implements the Appender interface around any arbitrary sender instance.
StackError is a grip re implementation of a type from legacy slogger.

# Interfaces

Appender is the slogger equivalent of a send.Sender, and this provides the same public interface for Appenders, in terms of Grip's senders.

# Type aliases

Level represents slogger's level types.