mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-04 11:22:10 +08:00 
			
		
		
		
	
							parent
							
								
									4aaf496086
								
							
						
					
					
						commit
						81d2268b55
					
				@ -2,14 +2,8 @@
 | 
				
			|||||||
storageLocation: ../../../../logs/
 | 
					storageLocation: ../../../../logs/
 | 
				
			||||||
# Log rotation period (in hours), default is acceptable
 | 
					# Log rotation period (in hours), default is acceptable
 | 
				
			||||||
rotationTime: 24
 | 
					rotationTime: 24
 | 
				
			||||||
# Maximum size of each log file (in MB), default is acceptable, it means unlimited
 | 
					# Number of log files to retain, default is acceptable
 | 
				
			||||||
maxSize: 0
 | 
					remainRotationCount: 2
 | 
				
			||||||
# Number of log files to retain, default is acceptable, it means whenever the log file is rotated, the old log file will be deleted
 | 
					 | 
				
			||||||
maxBackups: 10
 | 
					 | 
				
			||||||
# Old log retain time (in days), default is acceptable, it means unlimited
 | 
					 | 
				
			||||||
maxAge: 10
 | 
					 | 
				
			||||||
# Whether compress old log files.
 | 
					 | 
				
			||||||
compress: false
 | 
					 | 
				
			||||||
# Log level settings: 3 for production environment; 6 for more verbose logging in debugging environments
 | 
					# Log level settings: 3 for production environment; 6 for more verbose logging in debugging environments
 | 
				
			||||||
remainLogLevel: 6
 | 
					remainLogLevel: 6
 | 
				
			||||||
# Whether to output to standard output, default is acceptable
 | 
					# Whether to output to standard output, default is acceptable
 | 
				
			||||||
 | 
				
			|||||||
@ -136,11 +136,8 @@ func (r *RootCmd) initializeLogger(cmdOpts *CmdOpts) error {
 | 
				
			|||||||
		r.log.IsStdout,
 | 
							r.log.IsStdout,
 | 
				
			||||||
		r.log.IsJson,
 | 
							r.log.IsJson,
 | 
				
			||||||
		r.log.StorageLocation,
 | 
							r.log.StorageLocation,
 | 
				
			||||||
 | 
							r.log.RemainRotationCount,
 | 
				
			||||||
		r.log.RotationTime,
 | 
							r.log.RotationTime,
 | 
				
			||||||
		r.log.MaxBackups,
 | 
					 | 
				
			||||||
		r.log.MaxSize,
 | 
					 | 
				
			||||||
		r.log.MaxAge,
 | 
					 | 
				
			||||||
		r.log.Compress,
 | 
					 | 
				
			||||||
		config.Version,
 | 
							config.Version,
 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
 | 
				
			|||||||
@ -19,9 +19,9 @@ import (
 | 
				
			|||||||
	"github.com/openimsdk/tools/db/redisutil"
 | 
						"github.com/openimsdk/tools/db/redisutil"
 | 
				
			||||||
	"github.com/openimsdk/tools/mq/kafka"
 | 
						"github.com/openimsdk/tools/mq/kafka"
 | 
				
			||||||
	"github.com/openimsdk/tools/s3/cos"
 | 
						"github.com/openimsdk/tools/s3/cos"
 | 
				
			||||||
 | 
						"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"
 | 
				
			||||||
	"github.com/openimsdk/tools/s3/kodo"
 | 
					 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@ -44,11 +44,8 @@ type LocalCache struct {
 | 
				
			|||||||
type Log struct {
 | 
					type Log struct {
 | 
				
			||||||
	StorageLocation     string `mapstructure:"storageLocation"`
 | 
						StorageLocation     string `mapstructure:"storageLocation"`
 | 
				
			||||||
	RotationTime        uint   `mapstructure:"rotationTime"`
 | 
						RotationTime        uint   `mapstructure:"rotationTime"`
 | 
				
			||||||
 | 
						RemainRotationCount uint   `mapstructure:"remainRotationCount"`
 | 
				
			||||||
	RemainLogLevel      int    `mapstructure:"remainLogLevel"`
 | 
						RemainLogLevel      int    `mapstructure:"remainLogLevel"`
 | 
				
			||||||
	MaxSize         int    `mapstructure:"maxSize"`
 | 
					 | 
				
			||||||
	MaxBackups      int    `mapstructure:"maxBackups"`
 | 
					 | 
				
			||||||
	MaxAge          int    `mapstructure:"maxAge"`
 | 
					 | 
				
			||||||
	Compress        bool   `mapstructure:"compress"`
 | 
					 | 
				
			||||||
	IsStdout            bool   `mapstructure:"isStdout"`
 | 
						IsStdout            bool   `mapstructure:"isStdout"`
 | 
				
			||||||
	IsJson              bool   `mapstructure:"isJson"`
 | 
						IsJson              bool   `mapstructure:"isJson"`
 | 
				
			||||||
	WithStack           bool   `mapstructure:"withStack"`
 | 
						WithStack           bool   `mapstructure:"withStack"`
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user