diff --git a/library/logger/logger.go b/library/logger/logger.go index dfbb4a63..a41e68f7 100644 --- a/library/logger/logger.go +++ b/library/logger/logger.go @@ -78,7 +78,7 @@ func InitLogger(config configcenter.LoggerConfig) { rotatelogs.WithLinkName(config.FileAbsPath), rotatelogs.WithMaxAge(time.Duration(86400*7)*time.Second), rotatelogs.WithRotationTime(time.Duration(86400)*time.Second), - rotatelogs.WithRotationSize(1024*1024*500), + //rotatelogs.WithRotationSize(1024*1024*500), ) var writers io.Writer diff --git a/library/mediafiller/mediafiller.go b/library/mediafiller/mediafiller.go index df738d07..ab17fd8d 100644 --- a/library/mediafiller/mediafiller.go +++ b/library/mediafiller/mediafiller.go @@ -41,11 +41,12 @@ func SetFileServerDomainName(fileServerDomainName string) { } func (p *MediaFiller) GetFileServerDomain() string { - // cdn测试 - //if rand.Intn(100) < 20 { + if rand.Intn(100) < 5 { + return "https://filecdnhw01.tiefen.fun/" + } return "https://filecdn01.tiefen.fun/" - //} - return defaultMediaFiller.fileServerDomainName + + //return defaultMediaFiller.fileServerDomainName } func FillEntity(ctx *gin.Context, entity MediaFillable) error {