fix: libol: add datetime on log

This commit is contained in:
Daniel Ding
2022-09-24 18:26:34 +08:00
parent 38b3dd20fb
commit b5af44e0a5
2 changed files with 2 additions and 4 deletions

View File

@@ -6,9 +6,11 @@ import (
"github.com/luscis/openlan/pkg/config" "github.com/luscis/openlan/pkg/config"
"github.com/luscis/openlan/pkg/libol" "github.com/luscis/openlan/pkg/libol"
"github.com/luscis/openlan/pkg/switch" "github.com/luscis/openlan/pkg/switch"
"log"
) )
func main() { func main() {
log.SetFlags(0)
udp := api.GetEnv("ESPUDP", "4500") udp := api.GetEnv("ESPUDP", "4500")
config.SetLocalUdp(udp) config.SetLocalUdp(udp)
c := config.NewSwitch() c := config.NewSwitch()

View File

@@ -234,7 +234,3 @@ func (s *SubLogger) Error(format string, v ...interface{}) {
func (s *SubLogger) Fatal(format string, v ...interface{}) { func (s *SubLogger) Fatal(format string, v ...interface{}) {
s.logger.Write(FATAL, s.Fmt(format), v...) s.logger.Write(FATAL, s.Fmt(format), v...)
} }
func init() {
log.SetFlags(0)
}