feat: central log config

See coop-cloud/organising#422
This commit is contained in:
decentral1se 2024-07-07 23:45:20 +02:00
parent 6ec678208f
commit cf8ff410cc
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410

33
pkg/log/log.go Normal file
View File

@ -0,0 +1,33 @@
// Package log defines the core logging functionality for Abra.
package log
import (
"os"
charmLog "github.com/charmbracelet/log"
)
// Log is the central logging interface.
var log = charmLog.NewWithOptions(os.Stderr, charmLog.Options{
ReportCaller: true,
ReportTimestamp: false,
})
var Fatal = log.Fatal
var Fatalf = log.Fatalf
var Debug = log.Debug
var Debugf = log.Debugf
var Info = log.Info
var Infof = log.Infof
var Warn = log.Warn
var Warnf = log.Warnf
var Error = log.Error
var Errorf = log.Errorf
var SetLevel = log.SetLevel
var DebugLevel = charmLog.DebugLevel
var SetOutput = charmLog.SetOutput