-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update logger.ts #805
base: master
Are you sure you want to change the base?
Update logger.ts #805
Conversation
Changes Made: 1. Simplified the colorize function by directly using the colors object to get the color function, reducing the repetitive code for setting the timestamp. 2. Added a check in colorize to ensure that only valid levels are colorized, defaulting to the level name if not found.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey @aniruddhaadak80, here is an example of how you can ask me to improve this pull request: @Sweep Add unit tests for the `colorize` function to verify: 📖 For more information on how to use Sweep, please read our documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to 362797d in 26 seconds
More details
- Looked at
51
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_IhjJMkWG5HE03tst
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Please review and add |
Changes Made:
Simplified the colorize function by directly using the colors object to get the color function, reducing the repetitive code for setting the timestamp.
Added a check in colorize to ensure that only valid levels are colorized, defaulting to the level name if not found.
Important
Simplified
colorize
function inlogger.ts
and added validation for log levels to ensure only valid levels are colorized.colorize
function inlogger.ts
by using thecolors
object directly to fetch color functions, reducing repetitive code.colorize
to ensure only valid log levels are colorized, defaulting to the level name if not found.This description was created by for 362797d. It will automatically update as commits are pushed.