actually fix the build?
Gitea/etcdmtr/pipeline/head This commit looks good Details

This commit is contained in:
dave 2024-02-25 22:36:28 -08:00
parent a5048736c7
commit f66523610a
1 changed files with 35 additions and 0 deletions

35
pkg/etcdmtr/log.go Normal file
View File

@ -0,0 +1,35 @@
package etcdmtr
import (
"fmt"
"os"
)
type LogLevel int64
const (
LOGLEVEL_DEBUG LogLevel = iota
LOGLEVEL_INFO
LOGLEVEL_WARNING
LOGLEVEL_ERROR
LOGLEVEL_CRITICAL
LOGLEVEL_FATAL
)
type ELog struct {
}
func (e *ELog) Log(message string, a ...any) (n int, err error) {
return fmt.Printf(message+"\n", a...)
}
func (e *ELog) Fatal(message string, a ...any) (n int, err error) {
e.Log(message, a...)
os.Exit(1)
return 0, nil
}
func NewRootLogger() *ELog {
logger := &ELog{}
return logger
}