diff --git a/README.md b/README.md index 51705af..431c2a2 100644 --- a/README.md +++ b/README.md @@ -144,3 +144,11 @@ docker-compose up -d ## 许可证 MIT + +## 版权说明 + +本项目提供的必应每日一图抓取功能仅供个人学习、研究及壁纸设定等非商业用途。 + +- **图片版权**:图片版权归微软(Microsoft)或其原始作者所有。 +- **合规使用**:在使用本项目或通过本项目获取的图片时,请务必遵守微软的相关服务条款和版权声明。 +- **免责声明**:本项目不对图片的版权问题承担任何法律责任。用户因违规使用图片而产生的任何纠纷,由用户自行承担。 diff --git a/internal/bootstrap/bootstrap.go b/internal/bootstrap/bootstrap.go index a32476d..d9e0437 100644 --- a/internal/bootstrap/bootstrap.go +++ b/internal/bootstrap/bootstrap.go @@ -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")