seriouslysean / monster-hunter-now-events

A tool that auto-generates calendar events for Monster Hunter Now by scraping web news articles, processing them with AI, and creating a convenient calendar subscription.
https://seriouslysean.github.io/monster-hunter-now-events/
MIT License
8 stars 9 forks source link

[Feature]: Add logger utility to consolidate and remove console usages #7

Closed seriouslysean closed 8 months ago

seriouslysean commented 9 months ago

I'm imagining either a new utils/logger-utils.js file with some functions for logging info/warnings/errors, could probably even use chalk to make it look nicer in the console.

https://www.npmjs.com/package/chalk

Eventually, I'd like to move to passing errors to rollbar or something like it so a basic implementation would be a good start.

christianfds commented 9 months ago

I can do this, is there any preference on which lib to be used?

seriouslysean commented 9 months ago

@christianfds I'm not entirely sure. It doesn't need to be anything special. I was imagining either a new logger utils file with some functions for logging info/warnings/errors, could probably even use chalk to make it look nicer in the console.

Eventually, I'd like to move to passing errors to rollbar or something like it so a basic implementation would be a good start.

Moved some of this info to the ticket description, also. Thanks for asking!

christianfds commented 9 months ago

Awesome! I will write a facade or leverage a package (like slf4j on java) so any changes are easier in case you need to

seriouslysean commented 9 months ago

@christianfds you can use the basis I added in here when adding rollbar. This might make some of what you're doing easier.

https://github.com/seriouslysean/monster-hunter-now-events/pull/27