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 Logger class for improved performance and code simplicity #164

Closed
derevnjuk opened this issue Jun 28, 2023 · 0 comments · Fixed by #165 or #171
Closed

Refactor Logger class for improved performance and code simplicity #164

derevnjuk opened this issue Jun 28, 2023 · 0 comments · Fixed by #165 or #171
Assignees
Labels
Type: refactoring Changes in the way the code works internally without changing the output produced.

Comments

@derevnjuk
Copy link
Member

The current implementation of the Logger class can be optimized to improve performance and simplify the code. This tech debt ticket aims to address the following suggestions:

  1. Refactor string formatting to use template literals: replace the format function with template literals, which provide a more concise and readable way of formatting strings.

  2. Optimize MAX_FORMATTED_LEVEL_LENGTH calculation: instead of using the sort(), slice(), and pop() array operations, we can use the reduce() method to find the maximum length of the LogLevel enum.

@derevnjuk derevnjuk added the Type: refactoring Changes in the way the code works internally without changing the output produced. label Jun 28, 2023
@derevnjuk derevnjuk self-assigned this Jun 28, 2023
derevnjuk added a commit that referenced this issue Jul 20, 2023
derevnjuk added a commit that referenced this issue Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment