package
Version:
v0.0.0-...-8ad27d5
Opens a new window with list of versions in this module.
Published: Nov 5, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package logger provides support for initializing the log system.
-
type EventFn
-
type Events
-
type Level
-
type Logger
-
func (log *Logger) Debug(ctx context.Context, msg string, args ...any)
-
func (log *Logger) Debugc(ctx context.Context, caller int, msg string, args ...any)
-
func (log *Logger) Error(ctx context.Context, msg string, args ...any)
-
func (log *Logger) Errorc(ctx context.Context, caller int, msg string, args ...any)
-
func (log *Logger) Info(ctx context.Context, msg string, args ...any)
-
func (log *Logger) Infoc(ctx context.Context, caller int, msg string, args ...any)
-
func (log *Logger) Warn(ctx context.Context, msg string, args ...any)
-
func (log *Logger) Warnc(ctx context.Context, caller int, msg string, args ...any)
EventFn is a function to be executed when configured against a log level.
Events contains an assignment of an event function to a log level.
Level represents a logging level.
A set of possible logging levels.
Logger represents a logger for logging information.
New constructs a new log for application use.
NewWithEvents constructs a new log for application use with events.
Debug logs at LevelDebug with the given context.
Debugc logs the information at the specified call stack position.
Error logs at LevelError with the given context.
Errorc logs the information at the specified call stack position.
Info logs at LevelInfo with the given context.
Infoc logs the information at the specified call stack position.
Warn logs at LevelWarn with the given context.
Warnc logs the information at the specified call stack position.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.