From 15cceac7e0c946e333128ce64d14aa7cc8df7178 Mon Sep 17 00:00:00 2001 From: hanxuanyu <2252193204@qq.com> Date: Tue, 27 Jan 2026 09:40:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E5=87=BA=E9=85=8D=E7=BD=AE=E5=8F=8A?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E4=BF=A1=E6=81=AF=EF=BC=8C=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=89=88=E6=9D=83=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++++++ internal/bootstrap/bootstrap.go | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+) 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")