Loggers, it’s audit time!

Mohammed Ahmed
1 min readFeb 19, 2021

I’ve been tasked with overhauling the logger for our feeds in Telescope. It’s pushing a lot of redundant log messages onto the feed. While the information is great, some of those messages might be appropriate for debugging in development.

In processor.js, we call the error portion of the logger whenever the service shutsdown incorrectly. While this may be useful for development/debugging, there really isn’t any use for us to echo it in production. I proposed changing it into “debug”.

Logger Calls on Processor.js (before — ERROR, now — DEBUG)

Within worker.js, we echo out the concurrent worker every time it’s created. While this was a good idea in the infancy of Telescope, it’s pretty redundant now to keep them as it is, so I proposed we change it into debug.

Logger Calls in Worker.js(before — INFO, now — DEBUG)

With the microservices update coming soon, I plan on auditing our logger calls on there, and have a discussion on what to keep and what to remove for production.

--

--

Mohammed Ahmed
0 Followers

Transit Enthusiast, and Games Enthusiast