Documentation
¶
Index ¶
- Variables
- func Close() error
- func Debug(msg string, v ...any)
- func Error(msg string, v ...any)
- func IfErr(msg string, f func() error, ignoreErr ...error)
- func Info(msg string, v ...any)
- func NewPath(path string) logPath
- func NewSLoggerWithHandler(h slog.Handler, depth int) *slogger
- func Set(config *protolog.Logcat, path string)
- func Warn(msg string, v ...any)
- type FileWriter
- type Logger
- type LoggerAdvanced
- type LoggerOutput
Constants ¶
This section is empty.
Variables ¶
View Source
var OutputStderr bool = true
Functions ¶
func NewSLoggerWithHandler ¶ added in v0.3.7
Types ¶
type FileWriter ¶
type FileWriter struct {
// contains filtered or unexported fields
}
func NewLogWriter ¶
func NewLogWriter(file string) *FileWriter
func (*FileWriter) Close ¶
func (f *FileWriter) Close() error
type Logger ¶
type Logger interface { Debug(string, ...any) Info(string, ...any) Warn(string, ...any) Error(string, ...any) Enabled(level slog.Level) bool }
var DefaultLogger Logger = NewSLogger(1)
func NewSLogger ¶
type LoggerAdvanced ¶ added in v0.3.7
type LoggerOutput ¶ added in v0.3.7
type LoggerOutput struct {
// contains filtered or unexported fields
}
func Select ¶ added in v0.3.7
func Select(level slog.Level) LoggerOutput
func (LoggerOutput) Print ¶ added in v0.3.7
func (f LoggerOutput) Print(msg string, v ...any)
func (LoggerOutput) PrintFunc ¶ added in v0.3.7
func (f LoggerOutput) PrintFunc(msg string, ff func() []any)
Click to show internal directories.
Click to hide internal directories.