[PR #6484] [MERGED] fix(logs): standardize logs #6298

Closed
opened 2026-11-02 04:07:46 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6484
Author: @Mapioe
Created: 9/12/2026
Status: ✅ Merged
Merged: 9/13/2026
Merged by: @MHSanaei

Base: main ← Head: fix/consistent-logs


📝 Commits (3)

  • 747c325 fix(logs): standardize login and logout logs
  • 160816a Merge branch 'MHSanaei:main' into fix/consistent-logs
  • 9f932f2 fix(logs): log the real username on login lines

📊 Changes

1 file changed (+5 additions, -5 deletions)

View changed files

📝 internal/web/controller/index.go (+5 -5)

📄 Description

Summary

standardizes logs to one format

Why

Closes #6483

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

How was this tested?

docker compose up -d
Login
Logout
check logs

2026/09/12 13:21:30 INFO - X-UI: logged in successfully: username="admin", IP="172.19.0.1"
2026/09/12 13:21:27 INFO - X-UI: logged out successfully: username="admin"

Screenshots / recordings

Breaking changes

None

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • go build ./... and the test suite pass locally.
  • For frontend changes: npm run lint, npm run typecheck, and npm run build pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6484 **Author:** [@Mapioe](https://github.com/Mapioe) **Created:** 9/12/2026 **Status:** ✅ Merged **Merged:** 9/13/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix/consistent-logs` --- ### 📝 Commits (3) - [`747c325`](https://github.com/MHSanaei/3x-ui/commit/747c3255ab53b373b1b9b81c67b334e65d3d1b96) fix(logs): standardize login and logout logs - [`160816a`](https://github.com/MHSanaei/3x-ui/commit/160816a30eddd3f3881d08d745d7c666ffaa19f7) Merge branch 'MHSanaei:main' into fix/consistent-logs - [`9f932f2`](https://github.com/MHSanaei/3x-ui/commit/9f932f2da3c8e3bcacd99c53950fe267040771b1) fix(logs): log the real username on login lines ### 📊 Changes **1 file changed** (+5 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `internal/web/controller/index.go` (+5 -5) </details> ### 📄 Description ## Summary standardizes logs to one format ## Why Closes #6483 <!-- What problem does this solve, or what use case does it enable? Link related issues here: "Closes #123", "Refs #456". --> ## Type of change - [ ] Bug fix - [ ] New feature - [x] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [x] Other ## Areas affected - [ ] Frontend (UI / panel pages) - [ ] Backend (API endpoints, login, settings) - [ ] Xray config generation - [ ] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [ ] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## How was this tested? `docker compose up -d` Login Logout check logs ``` 2026/09/12 13:21:30 INFO - X-UI: logged in successfully: username="admin", IP="172.19.0.1" 2026/09/12 13:21:27 INFO - X-UI: logged out successfully: username="admin" ``` <!-- Concrete steps the reviewer can repeat. For UI changes: which page, which actions, which browser. For backend: which endpoint, which payload, which response. Mention any new unit/integration tests added. --> ## Screenshots / recordings <!-- Required for UI changes. Drag images or GIFs here. Remove if N/A. --> ## Breaking changes <!-- Does this change require existing users to update their config, run a migration, or change their API calls? If yes, describe the migration path. Write "None" if there are no breaking changes. --> None ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [ ] I added or updated tests for the new behavior (when applicable). - [x] `go build ./...` and the test suite pass locally. - [ ] For frontend changes: `npm run lint`, `npm run typecheck`, and `npm run build` pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:07:46 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6298
No description provided.