package
1.17.3
Repository: https://github.com/mongodb/mongo-go-driver.git
Documentation: pkg.go.dev

# Functions

EnvHasComponentVariables returns true if the environment contains any of the component environment variables.
FormatMessage formats a BSON document for logging.
New will construct a new logger.
NewIOSink will create an IOSink object that writes JSON messages to the provided io.Writer.
OperationID returns the operation ID from the context.
OperationName returns the operation name from the context.
ParseLevel will check if the given string is a valid environment variable for a logging severity level.
SerializeCommand takes a command and a variable number of key-value pairs and returns a slice of interface{} that can be passed to the logger for structured logging.
SerializeConnection serializes a Connection message into a slice of keys and values that can be passed to a logger.
SerializeServer serializes a Server message into a slice of keys and values that can be passed to a logger.
SerializeServerSelection serializes a Topology message into a slice of keys and values that can be passed to a logger.
SerializeTopology serializes a Topology message into a slice of keys and values that can be passed to a logger.
WithOperationID adds the operation ID to the context.
WithOperationName adds the operation name to the context.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
ComponentAll enables logging for all components.
ComponentCommand enables command monitor logging.
ComponentConnection enables connection services logging.
ComponentServerSelection enables server selection logging.
ComponentTopology enables topology logging.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DefaultMaxDocumentLength is the default maximum number of bytes that can be logged for a stringified BSON document.
DiffToInfo is the number of levels in the Go Driver that come before the "Info" level.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
LevelDebug enables logging of debug messages.
LevelInfo enables logging of informational messages.
LevelOff suppresses logging.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TruncationSuffix are trailing ellipsis "..." appended to a message to indicate to the user that truncation occurred.

# Variables

No description provided by the author

# Structs

Command is a struct defining common fields that must be included in all commands.
Connection contains data that all connection log messages MUST contain.
IOSink writes a JSON-encoded message to the io.Writer.
Logger represents the configuration for the internal logger.
Server contains data that all server messages MAY contain.
ServerSelection contains data that all server selection messages MUST contain.
Topology contains data that all topology messages MAY contain.

# Interfaces

LogSink represents a logging implementation, this interface should be 1-1 with the exported "LogSink" interface in the mongo/options package.

# Type aliases

Component is an enumeration representing the "components" which can be logged against.
KeyValues is a list of key-value pairs.
Level is an enumeration representing the log severity levels supported by the driver.