1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-09 20:17:21 +00:00

Fix some trivial problems (#34579)

This commit is contained in:
wxiaoguang
2025-06-02 23:22:43 +08:00
committed by GitHub
parent d5bbaee64e
commit e8d8984f7c
8 changed files with 46 additions and 12 deletions

View File

@ -103,7 +103,10 @@ func logPrinter(logger log.Logger) func(trigger Event, record *requestRecord) {
status = v.WrittenStatus()
}
logf := logInfo
if strings.HasPrefix(req.RequestURI, "/assets/") {
// lower the log level for some specific requests, in most cases these logs are not useful
if strings.HasPrefix(req.RequestURI, "/assets/") /* static assets */ ||
req.RequestURI == "/user/events" /* Server-Sent Events (SSE) handler */ ||
req.RequestURI == "/api/actions/runner.v1.RunnerService/FetchTask" /* Actions Runner polling */ {
logf = logTrace
}
message := completedMessage