Skip to content
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

Adding logging #143

Open
gliljas opened this issue Sep 5, 2022 · 2 comments
Open

Adding logging #143

gliljas opened this issue Sep 5, 2022 · 2 comments

Comments

@gliljas
Copy link

gliljas commented Sep 5, 2022

In the same vein as #137 I would appreciate more logging in the system, e.g. when troubleshooting leases. This could give a bit more context, such as when the lease was last renewed etc.

These days, many if not most libraries take a dependency on Microsoft.Extensions.Logging. I think that's feasible, but it has its own set of weaknesses and the dependency might be undesired. Requiring an implementation of a DistributedLock specific logger factory is certainly not a bad thing. And of course, it can be completely opt-in, with the default being a no-op logger.

@madelson
Copy link
Owner

madelson commented Sep 5, 2022

@gliljas do you think it would make sense to have both metric instrumentation and logging instrumentation? Are they complementary or not? Which do you see as a better fit for what you are doing?

@gliljas
Copy link
Author

gliljas commented Sep 5, 2022

I believe it would make sense, yes. There may be some overlap, but not much. A metric could indicate e.g an increasing delay in the lease refreshes, but when troubleshooting a specific error, like in my case, a log entry would be preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants