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
Add badges option to @tinyhttp/logger #51
Comments
Hi there @talentlessguy , i would like to try these on, is this mean to create a new type of middleware? or just extending logger middleware? |
@ahmad-reza619 hello, nope, as labeled on the issue, it should be done inside I have a mistake in the original code that leads to confusion, my bad edit: fixed |
I'm sorry for not noticing the label 😅 |
@ahmad-reza619 it's fine, you can make a PR at any time you want, and the setup instructions for this repo are in CONTRIBUTING.md file let me know if you have any questions and don't be afraid to ask them here |
@talentlessguy what about 3XX status code? |
and also, for captions what should be logged? the status or emoji name?
but the tables didn't have any text like |
not sure which emoji to pick, will write back here latter |
I meant alt text for emoji symbols, it can be found on Emojipedia |
@ahmad-reza619 pardon for changing requiremenets, I think instead of coming up with our own emojis (and having to think which ones suit better) we better use this module: https://github.com/bendrucker/http-status-emojis/blob/master/index.js |
@talentlessguy what about the alt text? |
@talentlessguy tbh I'm not sure about that we need it now... maybe it's useless? I mean something like
doesn't make much sense probably not worth adding it, just the emoji then |
@all-contributors please add ahmad-reza619 for code |
I've put up a pull request to add @ahmad! 🎉 |
Is your feature request related to a problem? Please describe.
It adds emoji badges for better readability
Describe the solution you'd like
Add
badges
setting with 2 sub-settings to be used like this:Default values are both false - if
badges: true
- only toggle emoji. if an object is present - check for the settings.first setting toggles emoji badges, like this⚠️
second enables emoji alt text (in case emoji fails to display or just prefer the text instead), like this:
warning
here's a table of emoji / texts:
Should be logged in the beginning:
Additional context
Zoya logger that has emoji:
The text was updated successfully, but these errors were encountered: