mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-03 18:52:15 +08:00
feat: implement log isSimpilfy.
This commit is contained in:
parent
d0d33b6b78
commit
ff0577a2fc
@ -10,4 +10,5 @@ remainLogLevel: 6
|
||||
isStdout: false
|
||||
# Whether to log in JSON format, default is acceptable
|
||||
isJson: false
|
||||
|
||||
# output simplify log when KeyAndValues's value len is bigger than 50 in rpc method log
|
||||
isSimplify: true
|
||||
@ -139,6 +139,7 @@ func (r *RootCmd) initializeLogger(cmdOpts *CmdOpts) error {
|
||||
r.log.RemainRotationCount,
|
||||
r.log.RotationTime,
|
||||
config.Version,
|
||||
r.log.IsSimplify,
|
||||
)
|
||||
if err != nil {
|
||||
return errs.Wrap(err)
|
||||
|
||||
@ -15,6 +15,9 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/openimsdk/tools/db/mongoutil"
|
||||
"github.com/openimsdk/tools/db/redisutil"
|
||||
"github.com/openimsdk/tools/mq/kafka"
|
||||
@ -22,8 +25,6 @@ import (
|
||||
"github.com/openimsdk/tools/s3/kodo"
|
||||
"github.com/openimsdk/tools/s3/minio"
|
||||
"github.com/openimsdk/tools/s3/oss"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type CacheConfig struct {
|
||||
@ -48,6 +49,7 @@ type Log struct {
|
||||
RemainLogLevel int `mapstructure:"remainLogLevel"`
|
||||
IsStdout bool `mapstructure:"isStdout"`
|
||||
IsJson bool `mapstructure:"isJson"`
|
||||
IsSimplify bool `mapstructure:"isSimplify"`
|
||||
WithStack bool `mapstructure:"withStack"`
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user