I have overwritten some of the events zerolog provides to improve my design. However, my code has become heavily duplicated and I want to reduce this duplication.
These methods above repeat to Warn(), Info(), Error(), Debug().
The main goal is to reduce coder effort. But my code turned into spaghetti and I need directions to refactor it, creating a kind of "middleware" to encapsulate it:
Hello folks.
I have overwritten some of the events zerolog provides to improve my design. However, my code has become heavily duplicated and I want to reduce this duplication.
These methods above repeat to Warn(), Info(), Error(), Debug().
The main goal is to reduce coder effort. But my code turned into spaghetti and I need directions to refactor it, creating a kind of "middleware" to encapsulate it:
So I created an zerolog.Event with all those Str but it completely failed on implementation.
Now I am open to suggestions.