mirror of
https://git.fightbot.fun/hxuanyu/BingPaper.git
synced 2026-02-15 07:19:33 +08:00
输出配置及存储信息,更新版权说明
This commit is contained in:
@@ -144,3 +144,11 @@ docker-compose up -d
|
||||
## 许可证
|
||||
|
||||
MIT
|
||||
|
||||
## 版权说明
|
||||
|
||||
本项目提供的必应每日一图抓取功能仅供个人学习、研究及壁纸设定等非商业用途。
|
||||
|
||||
- **图片版权**:图片版权归微软(Microsoft)或其原始作者所有。
|
||||
- **合规使用**:在使用本项目或通过本项目获取的图片时,请务必遵守微软的相关服务条款和版权声明。
|
||||
- **免责声明**:本项目不对图片的版权问题承担任何法律责任。用户因违规使用图片而产生的任何纠纷,由用户自行承担。
|
||||
|
||||
@@ -36,6 +36,31 @@ func Init(webFS embed.FS, configPath string) *gin.Engine {
|
||||
// 2. 初始化日志
|
||||
util.InitLogger(cfg.Log.Level)
|
||||
|
||||
// 输出配置信息
|
||||
util.Logger.Info("Application configuration loaded",
|
||||
zap.String("config_file", config.GetRawViper().ConfigFileUsed()),
|
||||
zap.String("db_type", cfg.DB.Type),
|
||||
zap.String("storage_type", cfg.Storage.Type),
|
||||
zap.Int("server_port", cfg.Server.Port),
|
||||
)
|
||||
|
||||
// 根据存储类型输出更多信息
|
||||
switch cfg.Storage.Type {
|
||||
case "s3":
|
||||
util.Logger.Info("S3 storage info",
|
||||
zap.String("endpoint", cfg.Storage.S3.Endpoint),
|
||||
zap.String("bucket", cfg.Storage.S3.Bucket),
|
||||
)
|
||||
case "webdav":
|
||||
util.Logger.Info("WebDAV storage info",
|
||||
zap.String("url", cfg.Storage.WebDAV.URL),
|
||||
)
|
||||
default:
|
||||
util.Logger.Info("Local storage info",
|
||||
zap.String("root", cfg.Storage.Local.Root),
|
||||
)
|
||||
}
|
||||
|
||||
// 3. 初始化数据库
|
||||
if err := repo.InitDB(); err != nil {
|
||||
util.Logger.Fatal("Failed to initialize database")
|
||||
|
||||
Reference in New Issue
Block a user