-
Notifications
You must be signed in to change notification settings - Fork 15
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
Please consider logging by default #5
Comments
It can accept a |
I think I just want it to log what automaxprocs logs, which is whether or not it changed the memlimit, and, if it did, what it set the memlimit to. |
Would something like a That way we could implement our own logging, or other means to display the changes any call to automemlimit.Xyz would add or update a modification, and we can print them (or any error) after calling/importing it. |
@KimMachineGun Can I use loggers like klog with this package? |
@thapabishwa-plerionaut |
AFAIK @KimMachineGun Do you have any eta on the release? |
@thapabishwa-plerionaut |
@KimMachineGun has slog compatibility been released with 0.4.0 version? |
Looks like it hasn't been done just yet. I've opened PR #12 to address the slog interoperability. |
@thapabishwa + I appreciate your PR, but at this time, I prefer not to add more external dependencies to this library. I think |
Sure. Let me take a look at if the recent changes. I will let you know if works for me or not. |
I can confirm that it works fine with
Finally, Any visibility on |
@thapabishwa-plerionaut I understand your concerns about updating the Go version. However, I believe that Go 1.21 was released over three months ago, and thanks to their compatibility promise, most programs should work well in Go 1.21 (in fact, they may work even better). + It may be possible to provide a way to configure the logger for versions prior to 1.21, but doing so would result in additional maintenance points. In my opinion, the effort required to maintain multiple versions outweighs the benefits that it provides. 😢 |
@KimMachineGun Any update on the final release of |
@thapabishwa-plerionaut If it won't be released soon, I'll tell you about the updated release plan for v0.5.0. |
Hey @KimMachineGun , any reason why 0.5.0.pre.4 droppped support for slog? |
The issue with slog is it's not supported in all "supported" versions of Go. Since a lot of projects support what Go officially supports for compilers (Latest - 1), slog would force everyone to only the latest Go version. When Go 1.22, slog can be added, since it's supported in Go >= 1.21. Personally, I would prefer supporting logging via creating a compatible interface. This would allow whatever logging the downstream project wants to use, rather than locking to a specific logger. |
@thapabishwa-plerionaut As @SuperQ mentioned, I decided to delay the release of But I need to figure out the interface-type logger. I think just the
|
Yup, I'm really looking forward to |
Should we reconsider changes introduced by PR #12? gologr has interoperability/implementation with various popular loggers(non-exhaustive list), such as:
Source: gologr implementations I think gologr effectively addresses the issues previously discussed here:
LMK your thoughts, @KimMachineGun. |
@thapabishwa-plerionaut
I totally agree with you, but I don't think the library would be the best choice. As I mentioned earlier,
This seems reasonable for now, but after the Go 1.22 release, every Go program should use at least Go 1.21, which will be the lowest version maintained by the Go team. So, if we release this feature after the Go 1.22 release, it won't be problematic. |
Great. Looking forward to |
My apologies for the late response, I've been quite busy lately. I've just finished a preliminary version of this feature. Your feedback on this pre-release version would be greatly appreciated, so feel free to leave any comments. https://github.com/KimMachineGun/automemlimit/releases/tag/v0.6.0-pre.1 |
Finally, v0.6.0 has been released! Please open an issue if you have any suggestions or feedback about logging. |
Hey, I just started using this package. I like it! But, I use it alongside automaxprocs, and I noticed automaxprocs always logs when it changes the GOMAXPROCS setting, whereas your package only logs when debug mode is enabled. I think since most people will use both packages, it would be nice if you also logged by default.
The text was updated successfully, but these errors were encountered: