summaryrefslogtreecommitdiffstats
path: root/modules/doctor
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-07-07 00:52:41 +0800
committerGitHub <noreply@github.com>2023-07-06 16:52:41 +0000
commitf0bde0e4f902970d447e3aae628f2dcf6f79e539 (patch)
tree8eae0d35b153b0bf0aa0a21a64cb3a70b3cfbd2b /modules/doctor
parentf03d95f0a9b76414347f340e6cfa107bcb37846d (diff)
downloadgitea-f0bde0e4f902970d447e3aae628f2dcf6f79e539.tar.gz
gitea-f0bde0e4f902970d447e3aae628f2dcf6f79e539.zip
Simplify the LFS GC logger usage (#25717)
Remove unnecessary `if opts.Logger != nil` checks. * For "CLI doctor" mode, output to the console's "logger.Info". * For "Web Task" mode, output to the default "logger.Debug", to avoid flooding the server's log in a busy production instance. Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'modules/doctor')
-rw-r--r--modules/doctor/lfs.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/doctor/lfs.go b/modules/doctor/lfs.go
index 64ee4c40bf..5f110b8f97 100644
--- a/modules/doctor/lfs.go
+++ b/modules/doctor/lfs.go
@@ -31,8 +31,8 @@ func garbageCollectLFSCheck(ctx context.Context, logger log.Logger, autofix bool
}
if err := repository.GarbageCollectLFSMetaObjects(ctx, repository.GarbageCollectLFSMetaObjectsOptions{
- Logger: logger,
- AutoFix: autofix,
+ LogDetail: logger.Info,
+ AutoFix: autofix,
// Only attempt to garbage collect lfs meta objects older than a week as the order of git lfs upload
// and git object upload is not necessarily guaranteed. It's possible to imagine a situation whereby
// an LFS object is uploaded but the git branch is not uploaded immediately, or there are some rapid