Log hash/name and reason of removal for removed files #65

Open
heiko wants to merge 2 commits from fix/44-log-removal-details into master
Owner

Log key (UUID), filename, and reason whenever a file is removed.

  • remove.go: log key=<uuid> name="<filename>" by=<user> reason=manual on manual removal; properly handle FindFile errors (return 404)
  • store.go Clean(): promote debug-only messages to log.Printf with structured fields: key, name, reason (info-expired / upload-expired)

Fixes #44

Log key (UUID), filename, and reason whenever a file is removed. - `remove.go`: log `key=<uuid> name="<filename>" by=<user> reason=manual` on manual removal; properly handle FindFile errors (return 404) - `store.go` Clean(): promote debug-only messages to `log.Printf` with structured fields: key, name, reason (info-expired / upload-expired) Fixes #44
- remove.go: log key, filename, user, and reason=manual on manual removal;
  handle FindFile errors properly (return 404)
- store.go Clean(): promote debug messages to log.Printf with structured
  fields: key, name, reason (info-expired / upload-expired)

Fixes #44
heiko requested review from mf 2026-05-27 17:49:50 +02:00
- remove.go: use %q for by= field (safe if username contains spaces)
- store.go Clean(): add area= field so expired-file logs identify the owner
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/44-log-removal-details:fix/44-log-removal-details
git switch fix/44-log-removal-details

Merge

Merge the changes and update on Forgejo.
git switch master
git merge --no-ff fix/44-log-removal-details
git switch fix/44-log-removal-details
git rebase master
git switch master
git merge --ff-only fix/44-log-removal-details
git switch fix/44-log-removal-details
git rebase master
git switch master
git merge --no-ff fix/44-log-removal-details
git switch master
git merge --squash fix/44-log-removal-details
git switch master
git merge --ff-only fix/44-log-removal-details
git switch master
git merge fix/44-log-removal-details
git push origin master
Sign in to join this conversation.
No description provided.