Reduce unnecessary runner logs in gitea #10487

Open
opened 2025-11-02 09:09:05 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @yp05327 on GitHub (Mar 23, 2023).

Feature Description

There are too many same FetchTask POST request logs in gitea which is unnecessary I think.
Maybe we can add a setting in app.ini to cut off these logs which have no errors.

For example:
logs, in https://github.com/go-gitea/gitea/issues/23636

Screenshots

No response

Originally created by @yp05327 on GitHub (Mar 23, 2023). ### Feature Description There are too many same `FetchTask` POST request logs in gitea which is unnecessary I think. Maybe we can add a setting in app.ini to cut off these logs which have no errors. For example: [logs](https://user-images.githubusercontent.com/89133723/226916303-99eeeb4e-4a29-450d-9843-c4cef489ff97.png), in https://github.com/go-gitea/gitea/issues/23636 ### Screenshots _No response_
GiteaMirror added the type/proposaltype/feature labels 2025-11-02 09:09:05 -06:00
Author
Owner

@wolfogre commented on GitHub (Mar 23, 2023):

Actually, the logs are printed by routers logs, and the runners have to send requests to Gitea periodically.

Every HTTP request will cause a log line, even requests for js/css:

image

You could disable routers logs or config it to file, like:

[log]
MODE = console
;DISABLE_ROUTER_LOG=false
ROUTER = file
@wolfogre commented on GitHub (Mar 23, 2023): Actually, the logs are printed by [routers logs](https://docs.gitea.io/en-us/config-cheat-sheet/#router-log-log), and the runners have to send requests to Gitea periodically. Every HTTP request will cause a log line, even requests for js/css: <img width="1920" alt="image" src="https://user-images.githubusercontent.com/9418365/227086581-c136a933-ddb5-47b2-a643-0fe8e1bbdcf2.png"> You could disable routers logs or config it to file, like: ```ini [log] MODE = console ;DISABLE_ROUTER_LOG=false ROUTER = file ```
Author
Owner

@wolfogre commented on GitHub (Mar 23, 2023):

Reopen because maybe we can provide a filter for routers logs(or Gitea already has? I am not sure)

@wolfogre commented on GitHub (Mar 23, 2023): Reopen because maybe we can provide a filter for routers logs(or Gitea already has? I am not sure)
Author
Owner

@yp05327 commented on GitHub (Mar 23, 2023):

IMO router logs are important in sometimes, but the request logs with no errors from runner, and repeat too many times like calling FetchTask, are not so important to be logged.
I don’t think simply disable router logs is a good answer for this problem. I agree to provide a router log filter to fix it.

@yp05327 commented on GitHub (Mar 23, 2023): IMO router logs are important in sometimes, but the request logs with no errors from runner, and repeat too many times like calling FetchTask, are not so important to be logged. I don’t think simply disable router logs is a good answer for this problem. I agree to provide a router log filter to fix it.
Author
Owner

@wxiaoguang commented on GitHub (Mar 23, 2023):

Or rewrite the FetchTask to WebSocket, etc

@wxiaoguang commented on GitHub (Mar 23, 2023): Or rewrite the `FetchTask` to WebSocket, etc
Author
Owner

@lunny commented on GitHub (Mar 24, 2023):

Or rewrite the FetchTask to WebSocket, etc

It comes from WebSocket ...

@lunny commented on GitHub (Mar 24, 2023): > Or rewrite the `FetchTask` to WebSocket, etc It comes from WebSocket ...
Author
Owner

@wxiaoguang commented on GitHub (Mar 24, 2023):

Use WebSocket as a one-time short connection?

@wxiaoguang commented on GitHub (Mar 24, 2023): Use WebSocket as a one-time short connection?
Author
Owner

@lafriks commented on GitHub (Mar 24, 2023):

Would be nice to classify what to log (UI, static resources, API, actions, internal API)

@lafriks commented on GitHub (Mar 24, 2023): Would be nice to classify what to log (UI, static resources, API, actions, internal API)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10487