package
Version:
v0.10.0
Opens a new window with list of versions in this module.
Published: Mar 7, 2026
License: AGPL-3.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
func Close()
-
func Debug(component, msg string, keyvals ...any)
-
func Error(component, msg string, keyvals ...any)
-
func Errorf(component, format string, args ...any)
-
func Info(component, msg string, keyvals ...any)
-
func Infof(component, format string, args ...any)
-
func Init(store LogStore)
-
func Warn(component, msg string, keyvals ...any)
-
func Warnf(component, format string, args ...any)
-
type LogRow
-
type LogStore
-
type Logger
Close flushes remaining logs and stops the background goroutine.
func Debug(component, msg string, keyvals ...any)
Debug logs at debug level.
func Error(component, msg string, keyvals ...any)
Error logs at error level.
func Errorf(component, format string, args ...any)
Errorf logs at error level with format string.
func Info(component, msg string, keyvals ...any)
Info logs at info level.
func Infof(component, format string, args ...any)
Infof logs at info level with format string.
Init initializes the global logger with a store backend.
func Warn(component, msg string, keyvals ...any)
Warn logs at warn level.
func Warnf(component, format string, args ...any)
Warnf logs at warn level with format string.
type LogRow struct {
Timestamp time.Time `json:"timestamp"`
Level string `json:"level"`
Component string `json:"component"`
Message string `json:"message"`
Context string `json:"context,omitempty"`
}
LogRow represents a single log entry.
LogStore is the interface for persisting logs.
Logger buffers log rows and flushes them to a LogStore.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.