Skip to content

refactor(log): replace log.Critical with log.Error#37624

Merged
wxiaoguang merged 1 commit into
mainfrom
copilot/refactor-log-critical-to-error
May 9, 2026
Merged

refactor(log): replace log.Critical with log.Error#37624
wxiaoguang merged 1 commit into
mainfrom
copilot/refactor-log-critical-to-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 9, 2026

This refactor removes log.Critical usage and standardizes error-level logging on log.Error. The obsolete global log.Critical helper is removed from the logging package API.

  • Logging API surface

    • Removed Critical(format string, v ...any) from modules/log/logger_global.go.
    • Kept behavior aligned with existing semantics by routing all former critical call paths to error-level logging.
  • Runtime call sites

    • Replaced every log.Critical(...) invocation with log.Error(...) in affected command, module, and service paths (startup/shutdown paths, panic recovery logs, transfer/rename rollback logs, OAuth source registration, task migration, and user rename rollback).
  • Example change

    - log.Critical("Failed to start server: %v", err)
    + log.Error("Failed to start server: %v", err)

Co-Authored-By: GPT-5 (OpenAI) <gpt-5@openai.com>

Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 9, 2026
@wxiaoguang wxiaoguang marked this pull request as ready for review May 9, 2026 16:08
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 9, 2026
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 9, 2026
@wxiaoguang wxiaoguang enabled auto-merge (squash) May 9, 2026 16:22
@wxiaoguang wxiaoguang merged commit 0a3aaea into main May 9, 2026
26 checks passed
@wxiaoguang wxiaoguang deleted the copilot/refactor-log-critical-to-error branch May 9, 2026 16:32
@GiteaBot GiteaBot added this to the 1.27.0 milestone May 9, 2026
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 12, 2026
* main:
  fix(deps): update dependency mermaid to v11.15.0 [security], add e2e test (go-gitea#37662)
  ci: Also lint json5 files (go-gitea#37659)
  fix(templates): avoid misleading compare message when branches lack merge base (go-gitea#37651)
  fix(deps): update npm dependencies (go-gitea#37647)
  refactor: routing info middleware (go-gitea#37653)
  chore(deps): update action dependencies (major) (go-gitea#37638)
  fix(deps): update go dependencies (major) (go-gitea#37639)
  ci(renovate): update Go import paths on major bumps (go-gitea#37641)
  fix(packages): Add label for private and internal package and fix composor package source permission check (go-gitea#37610)
  refactor: replace Fomantic search module with first-party code (go-gitea#37443)
  fix(deps): update npm dependencies (go-gitea#37636)
  fix(deps): update module code.gitea.io/sdk/gitea to v0.25.0 (go-gitea#37637)
  feat(api): add last_sync to repository API (go-gitea#37566)
  test(e2e): run playwright via container (go-gitea#37300)
  feat(editor): broaden language detection in web code editor (go-gitea#37619)
  refactor(log): replace log.Critical with log.Error (go-gitea#37624)
  fix: "run as root" check (go-gitea#37622)
  fix: improve actions status icons and texts (go-gitea#37206)

# Conflicts:
#	pnpm-workspace.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants