question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add badges option to @tinyhttp/logger

See original GitHub issue

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:

app.use(logger({ badges: { emoji: true, captions: false }))

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:

emoji text status code
Error 500
⚠️ status message 4XX (Except 404)
🆗 OK 2XX
🔎 Not Found 404

Should be logged in the beginning:

🆗 GET 200 OK /css/shared.css

Additional context

Zoya logger that has emoji:

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
talentlessguycommented, Aug 28, 2020

and also, for captions what should be logged? the status or emoji name? because you were saying

second enables emoji alt text (in case emoji fails to display or just prefer the text instead), like this: warning

but the tables didn’t have any text like warning

I meant alt text for emoji symbols, it can be found on Emojipedia

2reactions
talentlessguycommented, Aug 27, 2020

@ahmad-reza619 hello, nope, as labeled on the issue, it should be done inside @tinyhttp/logger

I have a mistake in the original code that leads to confusion, my bad

edit: fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Earn money with badges - Instagram Help Center
Approved accounts can use badges to monetize their content. ... About Badges. Add or edit a payout account on Instagram. Enable Ads on...
Read more >
How To Enable Instagram Badges - YouTube
How to enable Instagram badges Free Pitching To Brands WORKSHOP: https://bit.ly/3kGsVIp Free Gift For Influencers & Creators: ...
Read more >
badge app icon switch missing on my mail - Apple Discussions
The badge app icon is gone on my mail app and when I go into the settings for mail app under notifications there...
Read more >
How to Use Instagram Live Badges to Earn Money as a Creator
Instagram Live badges are the latest feature for influencers and ... Confirm that you want badges turned on, add a title, and go...
Read more >
Enable Notification Badges | Spark Help Center
Click Spark at the top left of your screen; Select Preferences > Notifications > Badges. Tick Enable dock icon badge; Select one of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found