mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
This unifies logging across the backend to always use the Logger class, always only logs to stdout (rather than an inconsistent mix of stdout and stderr, depending on whether console.error was used), and removes logging where two log events happened for the same message For example, this pattern: ```js Logger.error("Whoops, something went wrong:") console.error(err) ``` That causes two separate log events, and depending on the log transport used, could cause relevant log messages to get split across multiple events and therefore be harder (usually just more tedious) to connect and debug in production environments.