i18n: logs in rest pkgs

This commit is contained in:
HFO4
2022-10-08 18:51:52 +08:00
parent f2c53dda31
commit 644a326580
21 changed files with 66 additions and 65 deletions

View File

@ -16,10 +16,10 @@ import (
// InitRouter 初始化路由
func InitRouter() *gin.Engine {
if conf.SystemConfig.Mode == "master" {
util.Log().Info("当前运行模式:Master")
util.Log().Info("Current running mode: Master.")
return InitMasterRouter()
}
util.Log().Info("当前运行模式:Slave")
util.Log().Info("Current running mode: Slave.")
return InitSlaveRouter()
}
@ -108,7 +108,7 @@ func InitCORS(router *gin.Engine) {
// slave模式下未启动跨域的警告
if conf.SystemConfig.Mode == "slave" {
util.Log().Warning("当前作为存储端Slave运行但未启用跨域配置可能会导致 Master 端无法正常上传文件")
util.Log().Warning("You are running Cloudreve as slave node, if you are using slave storage policy, please enable CORS feature in config file, otherwise file cannot be uploaded from Master site.")
}
}