algolia / firestore-algolia-search

Apache License 2.0
108 stars 33 forks source link

Feature Request: disable debug logging (via configurable param?) #176

Open go-sean-go opened 11 months ago

go-sean-go commented 11 months ago

(Love this extension - sending tons of data to Algolia, and it's working great.)

The local env really suffers from all the debug logging being thrown; it looks like, for me, every file sync'd logs 3 (large) log entries:

It's about ~100 lines in my terminal window. This makes any local Firebase Emulator work very, very spammy.

I would love a way to disable this - perhaps via an entry in firestore-algolia-search.env? My perfect implementation would be to leave WARN logs and higher enabled, so perhaps the config line is like MIN_LOG_LEVEL or something. But it could also just be LOGS_DISABLED and that would serve me just fine. :)

(I am (personally) OK with these logs staying in production, though honestly I could imagine that being configurable as well for extremely high workloads that want to minimize logging.)

Thanks for the great extension!

smomin commented 11 months ago

hey @go-sean-go go ahead and create a PR with an approach you might have in mind. I can review it when its ready.