package
0.0.0-20240611043310-e7e2df93f36d
Repository: https://github.com/mdaxf/iac.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.
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 ConnectionMessage into a slice of keys and values that can be passed to a logger.
# 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
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
TruncationSuffix are trailling 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.
# Interfaces
LogSink represents a logging implementation, this interface should be 1-1 with the exported "LogSink" interface in the mongo/options package.