mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-04 03:13:15 +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"
|
||||||
)
|
)
|
||||||
@ -42,16 +42,13 @@ 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"`
|
||||||
RemainLogLevel int `mapstructure:"remainLogLevel"`
|
RemainRotationCount uint `mapstructure:"remainRotationCount"`
|
||||||
MaxSize int `mapstructure:"maxSize"`
|
RemainLogLevel int `mapstructure:"remainLogLevel"`
|
||||||
MaxBackups int `mapstructure:"maxBackups"`
|
IsStdout bool `mapstructure:"isStdout"`
|
||||||
MaxAge int `mapstructure:"maxAge"`
|
IsJson bool `mapstructure:"isJson"`
|
||||||
Compress bool `mapstructure:"compress"`
|
WithStack bool `mapstructure:"withStack"`
|
||||||
IsStdout bool `mapstructure:"isStdout"`
|
|
||||||
IsJson bool `mapstructure:"isJson"`
|
|
||||||
WithStack bool `mapstructure:"withStack"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Minio struct {
|
type Minio struct {
|
||||||
@ -284,7 +281,7 @@ type Third struct {
|
|||||||
Cos Cos `mapstructure:"cos"`
|
Cos Cos `mapstructure:"cos"`
|
||||||
Oss Oss `mapstructure:"oss"`
|
Oss Oss `mapstructure:"oss"`
|
||||||
Kodo Kodo `mapstructure:"kodo"`
|
Kodo Kodo `mapstructure:"kodo"`
|
||||||
Aws struct {
|
Aws struct {
|
||||||
Endpoint string `mapstructure:"endpoint"`
|
Endpoint string `mapstructure:"endpoint"`
|
||||||
Region string `mapstructure:"region"`
|
Region string `mapstructure:"region"`
|
||||||
Bucket string `mapstructure:"bucket"`
|
Bucket string `mapstructure:"bucket"`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user