actually fix the build?
Gitea/etcdmtr/pipeline/head This commit looks good
Details
Gitea/etcdmtr/pipeline/head This commit looks good
Details
This commit is contained in:
parent
a5048736c7
commit
f66523610a
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue