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/
 | 
			
		||||
# Log rotation period (in hours), default is acceptable
 | 
			
		||||
rotationTime: 24
 | 
			
		||||
# Maximum size of each log file (in MB), default is acceptable, it means unlimited
 | 
			
		||||
maxSize: 0
 | 
			
		||||
# 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
 | 
			
		||||
# Number of log files to retain, default is acceptable
 | 
			
		||||
remainRotationCount: 2
 | 
			
		||||
# Log level settings: 3 for production environment; 6 for more verbose logging in debugging environments
 | 
			
		||||
remainLogLevel: 6
 | 
			
		||||
# 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.IsJson,
 | 
			
		||||
		r.log.StorageLocation,
 | 
			
		||||
		r.log.RemainRotationCount,
 | 
			
		||||
		r.log.RotationTime,
 | 
			
		||||
		r.log.MaxBackups,
 | 
			
		||||
		r.log.MaxSize,
 | 
			
		||||
		r.log.MaxAge,
 | 
			
		||||
		r.log.Compress,
 | 
			
		||||
		config.Version,
 | 
			
		||||
	)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
 | 
			
		||||
@ -19,9 +19,9 @@ import (
 | 
			
		||||
	"github.com/openimsdk/tools/db/redisutil"
 | 
			
		||||
	"github.com/openimsdk/tools/mq/kafka"
 | 
			
		||||
	"github.com/openimsdk/tools/s3/cos"
 | 
			
		||||
	"github.com/openimsdk/tools/s3/kodo"
 | 
			
		||||
	"github.com/openimsdk/tools/s3/minio"
 | 
			
		||||
	"github.com/openimsdk/tools/s3/oss"
 | 
			
		||||
	"github.com/openimsdk/tools/s3/kodo"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"time"
 | 
			
		||||
)
 | 
			
		||||
@ -42,16 +42,13 @@ type LocalCache struct {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type Log struct {
 | 
			
		||||
	StorageLocation string `mapstructure:"storageLocation"`
 | 
			
		||||
	RotationTime    uint   `mapstructure:"rotationTime"`
 | 
			
		||||
	RemainLogLevel  int    `mapstructure:"remainLogLevel"`
 | 
			
		||||
	MaxSize         int    `mapstructure:"maxSize"`
 | 
			
		||||
	MaxBackups      int    `mapstructure:"maxBackups"`
 | 
			
		||||
	MaxAge          int    `mapstructure:"maxAge"`
 | 
			
		||||
	Compress        bool   `mapstructure:"compress"`
 | 
			
		||||
	IsStdout        bool   `mapstructure:"isStdout"`
 | 
			
		||||
	IsJson          bool   `mapstructure:"isJson"`
 | 
			
		||||
	WithStack       bool   `mapstructure:"withStack"`
 | 
			
		||||
	StorageLocation     string `mapstructure:"storageLocation"`
 | 
			
		||||
	RotationTime        uint   `mapstructure:"rotationTime"`
 | 
			
		||||
	RemainRotationCount uint   `mapstructure:"remainRotationCount"`
 | 
			
		||||
	RemainLogLevel      int    `mapstructure:"remainLogLevel"`
 | 
			
		||||
	IsStdout            bool   `mapstructure:"isStdout"`
 | 
			
		||||
	IsJson              bool   `mapstructure:"isJson"`
 | 
			
		||||
	WithStack           bool   `mapstructure:"withStack"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type Minio struct {
 | 
			
		||||
@ -284,7 +281,7 @@ type Third struct {
 | 
			
		||||
		Cos    Cos    `mapstructure:"cos"`
 | 
			
		||||
		Oss    Oss    `mapstructure:"oss"`
 | 
			
		||||
		Kodo   Kodo   `mapstructure:"kodo"`
 | 
			
		||||
		Aws struct {
 | 
			
		||||
		Aws    struct {
 | 
			
		||||
			Endpoint        string `mapstructure:"endpoint"`
 | 
			
		||||
			Region          string `mapstructure:"region"`
 | 
			
		||||
			Bucket          string `mapstructure:"bucket"`
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user