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

refactor LHLogger #57

Open
ronnno opened this issue Aug 7, 2019 · 0 comments
Open

refactor LHLogger #57

ronnno opened this issue Aug 7, 2019 · 0 comments

Comments

@ronnno
Copy link
Contributor

ronnno commented Aug 7, 2019

LHLogger was implemented before scribe was extracted as a standalone message.
Most of the functionality it introduces already exists in scribe (contextual tags). It adds two things that scribe does not provide today:

  1. Dynamic field values - currently log.Stringable() does not indicate if String() is executed during WithTags and the result cached, or later, on each invocation of Info/Error.
  2. Debug level

The proposed refactor includes removing LHLogger and replacing it with direct use of scribe:

  1. TBD - add &1 and/or &2 to scribe after discussion (@electricmonk ?) and remove or shrink scope of LHLogger
  2. Stop storing logger object in long lasting structs - because it ignores the contextual nature of scribe logger objects
  3. Create a local logger object in each long lasting go-routine. enrich it with node address etc.
  4. in each select case clause set proper entry point and contextual data for the current request
  5. attach logger to func calls as parameters instead of relying of access to long lasting structs to promote contextual logging
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