node.js - Why use different debug modules depending on production/development status? -
so express best practices page, among others, states 1 should use debug module debugging , winston logging app activity in production.
- why 1 not use winston all?
- ...and if using both how 1 decide goes in winston debug vs debug's debug?
it's not big deal library use log/debug, many express applications use neither winston nor debug. debug has convenience features makes easier use on using winston debugging. use winston, , write own wrapper around debug() method in order replicate exact functionality of debug module. if use both, use debug module log messages used strictly developing , diagnosing bugs, , use winston log messages file/database/service while application in production.
Comments
Post a Comment