1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-14 01:40:40 +00:00

Update WriteMsg signatures for custom log formatting update

This commit is contained in:
IamCathal
2020-08-18 21:30:11 +01:00
parent cead72c6df
commit 6c002a3124
11 changed files with 187 additions and 83 deletions

View File

@ -4,7 +4,6 @@ import (
"encoding/json"
"strings"
"sync"
"time"
"github.com/astaxie/beego/pkg/logs"
"github.com/gogo/protobuf/proto"
@ -103,9 +102,8 @@ func (c *aliLSWriter) Init(jsonConfig string) (err error) {
// WriteMsg writes a message in connection.
// If connection is down, try to re-connect.
func (c *aliLSWriter) WriteMsg(when time.Time, msg string, level int) (err error) {
if level > c.Level {
func (c *aliLSWriter) WriteMsg(lm *logs.LogMsg) error {
if lm.Level > c.Level {
return nil
}