-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
[bug] Setting maxprocs may log a scary but innocuous error #1398
Labels
bug
Something isn't working
Comments
@tsmethurst @NyaaaWhatsUpDoc Any preference on how to resolve it? I'm leaning towards a no-op logger for that thing |
A no-op logger sounds fine to me, or change level to debug or something! |
yep honestly the maxprocs internal logs seem to be a bit weird, am all for disabling them |
daenney
added a commit
to daenney/gotosocial
that referenced
this issue
Jan 30, 2023
This switches the logger to Debug. By default the library logs things internally despite returning errors. Due to the way we had it hooked up this resulted in scary error level logs being emitted for innocuous errors. Now those errors will only be visible in debug mode. Fixes: superseriousbusiness#1398 Relates to: superseriousbusiness#1336
tsmethurst
pushed a commit
that referenced
this issue
Jan 31, 2023
This switches the logger to Debug. By default the library logs things internally despite returning errors. Due to the way we had it hooked up this resulted in scary error level logs being emitted for innocuous errors. Now those errors will only be visible in debug mode. Fixes: #1398 Relates to: #1336
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug with a clear and concise description of what the bug is.
@blackle brought this up in Matrix, because their instance logged
This is a consequence of my change in #1336 and specifically
gotosocial/cmd/gotosocial/action/server/server.go
Line 65 in e433e1a
Apparently, when it fails to set the limit because no quota was defined in the first place the library internally logs an error (it doesn't return an error, since there isn't actually a problem) https://github.com/uber-go/automaxprocs/blob/58f5aee66e9fc9138dd8ff4f966f101b51b7db63/maxprocs/maxprocs.go#L110-L113
We should probably change that to not be an error logger, perhaps even give it a no-op logger? We handle the error properly so other than that there should be no reason for the library to emit a log line itself. It might still be useful to get the log line from the lib, but that should probably be a "in development mode" only thing.
What's your GoToSocial Version?
git
GoToSocial Arch
No response
Browser version
No response
What happened?
No response
What you expected to happen?
No response
How to reproduce it?
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: