Versions in this module Expand all Collapse all v1 v1.0.2 Feb 21, 2023 v1.0.1 Feb 20, 2023 v1.0.0 Feb 17, 2023 Changes in this version + const ModuleId + var PresetConfigDiscard = Config + var PresetConfigStdout = Config + func Configure(cfg *Config) + func DefaultPrefixWidth() int + func LogLevelName(level Level) string + func RegisterBootFactory() + func SetDefaultEnableSourceLocation(flag bool) + func SetDefaultLevel(lvl Level) + func SetDefaultPrefixWidth(width int) + func SetLevel(name string, lvl Level) + func StringToLogLevelHookFunc(f reflect.Type, t reflect.Type, data any) (any, error) + type Config struct + Append bool + Compress bool + Console bool + DefaultEnableSourceLocation bool + DefaultLevel string + DefaultPrefixWidth int + Filename string + Levels []LevelConfig + LogServer LogServerConfig + MaxAge int + MaxBackups int + MaxSize int + RotateSchedule string + UTC bool + type Level int + const LevelAll + const LevelDebug + const LevelError + const LevelInfo + const LevelTrace + const LevelWarn + func DefaultLevel() Level + func GetLevel(name string) Level + func ParseLogLevel(name string) Level + func ParseLogLevelP(name string) (Level, bool) + func (lvl *Level) UnmarshalJSON(b []byte) error + type LevelConfig struct + EnableSourceLocation bool + Level string + Pattern string + type Log interface + Debug func(...any) + DebugEnabled func() bool + Debugf func(format string, args ...any) + Error func(...any) + ErrorEnabled func() bool + Errorf func(format string, args ...any) + Info func(...any) + InfoEnabled func() bool + Infof func(format string, args ...any) + Level func() Level + Log func(level Level, m ...any) + LogEnabled func(level Level) bool + LogWithSkipCallstack func(lvl Level, skip int, m ...any) + Logf func(level Level, format string, args ...any) + LogfWithSkipCallstack func(lvl Level, skip int, format string, args ...any) + SetLevel func(level Level) + Trace func(...any) + TraceEnabled func() bool + Tracef func(format string, args ...any) + Warn func(...any) + WarnEnabled func() bool + Warnf func(format string, args ...any) + func GetLog(name string) Log + func NewLog(name string, writer io.Writer) Log + func NewLogFile(name string, cfg LogFileConf) Log + type LogFileConf struct + Append bool + Compress bool + Console bool + EnableSourceLocation bool + Filename string + Level string + LogServer LogServerConfig + MaxAge int + MaxBackups int + MaxSize int + PrefixWidth int + RotateSchedule string + type LogServerConfig struct + Address string + Labels map[string]string + type LogVaultWriter struct + func NewLogVaultWriter(serverAddress string, labels map[string]string) *LogVaultWriter + func (lvw *LogVaultWriter) Start() + func (lvw *LogVaultWriter) Stop() + func (lvw *LogVaultWriter) Write(timestamp time.Time, line string) + type Module struct + func (m *Module) Start() error + func (m *Module) Stop() + type PushJson struct + Streams []StreamJson + type StreamJson struct + Labels map[string]string + Values []*logproto.Entry