Javascript - Logger / Logging (Tracing)
About
logging in Javascript
Articles Related
List
- Webpack: see definePlugin - the plugin does a direct text replacement. If you perform logging in your development build but not in the production build you might use a global constant to determine whether logging takes place.
- The value given to it must include actual quotes inside of the string itself. Typically, this is done either with alternate quotes, such as:
- '“production”',
- or by using JSON.stringify('production')
Library
- https://github.com/winstonjs/winston (only for Node for now)
- https://github.com/visionmedia/debug - A tiny JavaScript debugging utility modelled after Node.js core's debugging technique. Works in Node.js and web browsers.
- browser console: Javascript - (Console) Logging