package
0.0.0-20240827064703-d95ef77859ba
Repository: https://github.com/mateothegreat/go-multilog.git
Documentation: pkg.go.dev
# Functions
Debug logs a debug message to all registered loggers at the DEBUG level.
Error logs an error message to all registered loggers at the ERROR level.
Fatal logs a fatal message to all registered loggers at the FATAL level.
Info logs an info message to all registered loggers at the INFO level.
NewConsoleLogger creates a new CustomLogger for console logging.
NewElasticsearchLogger creates a new elasticsearch logger.
NewLogger creates a new logger for the given log method.
NewPrettyHandler creates a new PrettyHandler with the given output writer and options.
NewSlogLogger creates a new slog.Logger with a PrettyHandler.
No description provided by the author
RegisterLogger registers a custom logger for a given log method.
Trace logs a trace message to all registered loggers at the TRACE level.
Warn logs a warn message to all registered loggers at the WARN level.
# Constants
DEBUG represents the debug log level.
ERROR represents the error log level.
FATAL represents the fatal log level.
No description provided by the author
No description provided by the author
INFO represents the info log level.
LoggerConsole represents the console log method.
LoggerElasticsearch represents the elasticsearch log method.
TRACE represents the trace log level.
WARN represents the warn log level.
# Variables
Loggers is a map of log methods to custom loggers.
# Structs
ConsoleLogger is a custom logger that uses slog.Logger.
CustomLogger is a struct that defines a custom logger with setup and log functions.
ElasticsearchLog is the structure of the log that will be sent to the elasticsearch cluster.
ElasticsearchLogger is the logger that sends logs to an elasticsearch cluster.
NewConsoleLoggerArgs are the arguments for the NewConsoleLogger function.
NewElasticsearchLoggerArgs are the arguments to create a new elasticsearch logger.
PrettyHandler is a custom handler for pretty-printing log messages.
PrettyHandlerOptions defines options for the PrettyHandler.
# Interfaces
Logger is an interface that defines the methods required for a logger.