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

Logging improvements #51

Open
IharYakimush opened this issue Apr 23, 2019 · 0 comments
Open

Logging improvements #51

IharYakimush opened this issue Apr 23, 2019 · 0 comments

Comments

@IharYakimush
Copy link

IharYakimush commented Apr 23, 2019

Some times I have following issues: Failed to extend lock, NoQuorum (Acquired: 0, Conflicted: 0, Error: 1)

It is hard to find details about error preventing lock extension because it is logged with "Debug" level. logger.LogDebug($"Error extending lock instance {host}: {ex.Message}");

I would propose to have following improvements in logging:

  1. Create and use EventId for every log message
  2. Pass entire exception to logger
  3. Be able to configure log level for some key events

For instance in my case it might be like

public static class LogEvents
    {
        public static EventId ErrorExtendingLockInstance = new EventId(123, "ErrorExtendingLockInstance");
    }

logger.LogDebug(LogEvents.ErrorExtendingLockInstance, ex, $"Error extending lock instance {host}: {ex.Message}");

Right now can't propose how to make log level for events configurable, but it should be doable.

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

No branches or pull requests

1 participant