-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Log file splitting is not working #11269
Comments
It's more like:
etc. |
Hmm ok I'll give it a try but I'm still confused a bit. I found the log documentation https://docs.gitea.io/en-us/logging-configuration/ and it is talking about Beside that, there should be some default for the sublogger configs like If this is not enough then my question is, what option exactly is required to get a working standalone router log? |
Sorry if that was not helpful, I just copied&pasted part of my own config and edited it a bit. Of course there are defaults, but I thought I could show you a sample of how is the log configuration structured. TBH, I'm not an expert on the log configuration. It is a bit confusing because it's been revamped (as of 1.9.something I believe?) with a much more powerful syntax, but it was decided that the new code should support the old syntax too so... your settings happen to resemble the old syntax. |
No thanks a lot for your help! :) I just try to understand the details. Of course the new syntax looks very powerful but currently there are too many questios in my mind :) I'll play a bit with the config and maybe we could improve the documentation. |
@xoxys sorry it's taken me so long to reply. The macaron, router and access loggers make their entries at INFO level - so setting LEVEL= Warn means that unless you override their specific log level to LEVEL=Info you won't get any. So the simplest log settings to set what you want should be: [log]
ROOT_PATH = /opt/gitea/log
MODE = file
REDIRECT_MACARON_LOG = true
MACARON = file
; ROUTER_LOG_LEVEL = Info ; this is the default anyway
ROUTER = file
ENABLE_ACCESS_LOG = true
ACCESS = file
LEVEL = Warn
;STACKTRACE_LEVEL = None ; this is the default anyway
[log.file.macaron]
LEVEL = Info
[log.file.router]
LEVEL = Info
[log.file.access]
LEVEL = Info Now that's a little awkward and it would probably be nice to set the default logger separately. So I'll put up a PR that allows us to set |
🤦 ouch... ok the log level was the missing part. Makes sense now :) Thanks a lot!
No need to apologize for anything. All of you do an amazing job. Thanks for your work. |
Closing as answered. 😄 |
[x]
):Description
I've set the following options in the custom config file which should enable logging to multiple log files:
But this will still result in empty log files for access, macaron and router:
The text was updated successfully, but these errors were encountered: