-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor slog.go for better code readability
Code in slog.go was refactored to improve readability and maintainability. Previously, several operations were being performed in a single function, AddTracingContextWithAttributes. Now, parts of this function were extracted to create three new functions: handleError, addTraceContextToLog, and addServiceName. Each of these takes care of a specific logging-related operation. This change aims to adhere to the single responsibility principle, which makes debugging easier and code easier to read and understand. Signed-off-by: Vincent Free <[email protected]>
- Loading branch information
1 parent
02752d7
commit c9d57c2
Showing
1 changed file
with
50 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters