format code

This commit is contained in:
Deng Ming
2022-12-23 10:25:06 +08:00
committed by Ming Deng
parent ef55bd0fac
commit 0bee140abb
64 changed files with 35 additions and 109 deletions

View File

@@ -30,7 +30,6 @@
// log.Debug("debug")
// log.Critical("critical")
//
// more docs http://beego.vip/docs/module/logs.md
package logs
import (

View File

@@ -15,8 +15,6 @@
package logs
import (
"time"
"github.com/beego/beego/v2/core/logs"
)
@@ -40,30 +38,6 @@ func (o *oldToNewAdapter) Flush() {
o.old.Flush()
}
func (o *oldToNewAdapter) SetFormatter(f logs.LogFormatter) {
func (*oldToNewAdapter) SetFormatter(f logs.LogFormatter) {
panic("unsupported operation, you should not invoke this method")
}
type newToOldAdapter struct {
n logs.Logger
}
func (n *newToOldAdapter) Init(config string) error {
return n.n.Init(config)
}
func (n *newToOldAdapter) WriteMsg(when time.Time, msg string, level int) error {
return n.n.WriteMsg(&logs.LogMsg{
When: when,
Msg: msg,
Level: level,
})
}
func (n *newToOldAdapter) Destroy() {
panic("implement me")
}
func (n *newToOldAdapter) Flush() {
panic("implement me")
}