Documentation
¶
Index ¶
- Variables
- func FromContext(ctx context.Context) zerolog.Logger
- func Get() zerolog.Logger
- func Init(level string, format string, logFile string, noColor bool) error
- func SetTestMode(enabled bool)
- func WithDatabase(database string) zerolog.Logger
- func WithLogger(ctx context.Context, logger zerolog.Logger) context.Context
- func WithOperation(operation string) zerolog.Logger
- func WithTable(table string) zerolog.Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger zerolog.Logger
Logger is the global logger instance
Functions ¶
func FromContext ¶
FromContext retrieves the logger from context, or returns the global logger if not found
func SetTestMode ¶
func SetTestMode(enabled bool)
SetTestMode enables or disables test mode In test mode, all log output is suppressed
func WithDatabase ¶
WithDatabase creates a sub-logger with database field
func WithLogger ¶
WithLogger adds a logger to the context
func WithOperation ¶
WithOperation creates a sub-logger with operation field
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.