Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

access.log stays empty #14121

Closed
5 tasks
FredFoo opened this issue Dec 23, 2020 · 0 comments · Fixed by #14475
Closed
5 tasks

access.log stays empty #14121

FredFoo opened this issue Dec 23, 2020 · 0 comments · Fixed by #14475
Assignees
Labels

Comments

@FredFoo
Copy link

FredFoo commented Dec 23, 2020

  • Gitea version (or commit ref): 1.14.0+dev-449-ge0c753e77 (latest docker image (non-rootless))
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • [x ] No
  • Log gist:

Description

I did activate the access log in the config using

DISABLE_ROUTER_LOG=false
ENABLE_ACCESS_LOG=true
ACCESS=file

access.log file appears in the expected location but stays empty. If you tail it you can see that on incoming requests emtpy lines are added.

gitea.log contains error messages:
2020/12/23 14:49:49 ...outers/routes/chi.go:71:1() [E] Could not set up macaron access logger: template: log:1:6: executing "log" at <.Ctx.RemoteAddr>: can't evaluate field Ctx in type routes.routerLoggerOptions

@noerw noerw added the type/bug label Dec 23, 2020
@lunny lunny self-assigned this Dec 23, 2020
@lunny lunny mentioned this issue Jan 26, 2021
6543 pushed a commit that referenced this issue Jan 27, 2021
Fix #14121, #14478.

The `AccessLog` middleware has to be after `Contexter` or `APIContexter` so that we can get `LoginUserName` if possible.
And also there is a **BREAK** change that it removed internal API access log.
@go-gitea go-gitea locked and limited conversation to collaborators Mar 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants