Skip to content

ACCESS_LOG_TEMPLATE hat no affect #6699

Closed
@markuman

Description

@markuman
  • Gitea version (or commit ref): 799f5e0 - 1.8.0
  • Git version: 2.20.1
  • Operating system: Host Ubuntu 18.04.02, Docker Container Alpine Linux v3.9
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I'm running gitea in a docker swarm service and try to change the log format output to apache like format.

[log]
MODE                 = console
LEVEL                = Info
STACKTRACE_LEVEL     = None
REDIRECT_MACARON_LOG = false
ENABLE_ACCESS_LOG    = true
ENABLE_XORM_LOG      = false

[log.console]
MODE                = console
LEVEL               = info
PREFIX              = 
COLORIZE            = true
ACCESS_LOG_TEMPLATE = {{.Ctx.RemoteAddr}} {{.Ctx.Req.Method}} {{.Ctx.Req.RequestURI}} {{.ResponseWriter.Status}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"

But it seems that the ACCESS_LOG_TEMPLATE hat no affect. Nevermind how I set it, it stays like that.

docker service logs -t -f gitea
...
2019-04-21T09:44:33.606778949Z gitea.1.flh38cdap06m@hetzner    | [Macaron] 2019-04-21 09:44:33: Completed POST /user/login 302 Found in 51.319426ms
2019-04-21T09:44:33.663784917Z gitea.1.flh38cdap06m@hetzner    | [Macaron] 2019-04-21 09:44:33: Started GET /explore/repos for 92.208.209.160
....

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/not-a-bugThe reported issue is the intended behavior or the problem is not inside Gitea

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions