mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-04 11:22:10 +08:00 
			
		
		
		
	feat: implement log isSimpilfy.
This commit is contained in:
		
							parent
							
								
									d0d33b6b78
								
							
						
					
					
						commit
						ff0577a2fc
					
				@ -10,4 +10,5 @@ remainLogLevel: 6
 | 
				
			|||||||
isStdout: false
 | 
					isStdout: false
 | 
				
			||||||
# Whether to log in JSON format, default is acceptable
 | 
					# Whether to log in JSON format, default is acceptable
 | 
				
			||||||
isJson: false
 | 
					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.RemainRotationCount,
 | 
				
			||||||
		r.log.RotationTime,
 | 
							r.log.RotationTime,
 | 
				
			||||||
		config.Version,
 | 
							config.Version,
 | 
				
			||||||
 | 
							r.log.IsSimplify,
 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return errs.Wrap(err)
 | 
							return errs.Wrap(err)
 | 
				
			||||||
 | 
				
			|||||||
@ -15,6 +15,9 @@
 | 
				
			|||||||
package config
 | 
					package config
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
 | 
						"strings"
 | 
				
			||||||
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/openimsdk/tools/db/mongoutil"
 | 
						"github.com/openimsdk/tools/db/mongoutil"
 | 
				
			||||||
	"github.com/openimsdk/tools/db/redisutil"
 | 
						"github.com/openimsdk/tools/db/redisutil"
 | 
				
			||||||
	"github.com/openimsdk/tools/mq/kafka"
 | 
						"github.com/openimsdk/tools/mq/kafka"
 | 
				
			||||||
@ -22,8 +25,6 @@ import (
 | 
				
			|||||||
	"github.com/openimsdk/tools/s3/kodo"
 | 
						"github.com/openimsdk/tools/s3/kodo"
 | 
				
			||||||
	"github.com/openimsdk/tools/s3/minio"
 | 
						"github.com/openimsdk/tools/s3/minio"
 | 
				
			||||||
	"github.com/openimsdk/tools/s3/oss"
 | 
						"github.com/openimsdk/tools/s3/oss"
 | 
				
			||||||
	"strings"
 | 
					 | 
				
			||||||
	"time"
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type CacheConfig struct {
 | 
					type CacheConfig struct {
 | 
				
			||||||
@ -48,6 +49,7 @@ type Log struct {
 | 
				
			|||||||
	RemainLogLevel      int    `mapstructure:"remainLogLevel"`
 | 
						RemainLogLevel      int    `mapstructure:"remainLogLevel"`
 | 
				
			||||||
	IsStdout            bool   `mapstructure:"isStdout"`
 | 
						IsStdout            bool   `mapstructure:"isStdout"`
 | 
				
			||||||
	IsJson              bool   `mapstructure:"isJson"`
 | 
						IsJson              bool   `mapstructure:"isJson"`
 | 
				
			||||||
 | 
						IsSimplify          bool   `mapstructure:"isSimplify"`
 | 
				
			||||||
	WithStack           bool   `mapstructure:"withStack"`
 | 
						WithStack           bool   `mapstructure:"withStack"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user