Closed RalphORama closed 1 week ago
Might be useful down the line to add a environment flag (NODE_ENV = 'development' | 'production'
) to .env
, so we can filter out log levels/reroute output depending on the environment. Seems easy to add afterward, though.
edit: We can probably use the LINKFIX_DEBUG
flag in .env
for the above, since I don't think we need multiple environments for now.
See: https://github.com/shoegaze/linkfix-for-discord/tree/22-add-logging (No PR yet, waiting for #10 to merge)
I am writing so many freaking
console.debug()
statements its crazy. We should implement a structured logging framework.I don't want to deal with JSON output (even though that may end up being an unwise decision). And timestamps shouldn't be a huge issue since
docker [compose] logs
has an option to show timestamps.Some options from a quick "DuckDuckGo" web search: