You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The vanilla console.log/warn/error is convenient, and works on both client-side (browser) and server-side(e.g. nodejs) apps. But it only prints to stdout/stderr.
Popular logging frameworks like winston is powerful, providing different log levels, different format of output (stdout, a file, and a database etc.). But is not directly working on client-side so far, and introduce more dependencies.
A feasible solution is using a customized logger, and delegate logger.log to console.log or winston based on running environment.
The text was updated successfully, but these errors were encountered:
The vanilla console.log/warn/error is convenient, and works on both client-side (browser) and server-side(e.g. nodejs) apps. But it only prints to stdout/stderr.
Popular logging frameworks like winston is powerful, providing different log levels, different format of output (stdout, a file, and a database etc.). But is not directly working on client-side so far, and introduce more dependencies.
A feasible solution is using a customized logger, and delegate logger.log to console.log or winston based on running environment.
The text was updated successfully, but these errors were encountered: