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
I don't think there is a need for a fancy logger, but would be nice to have console.log, console.debug, ... in the code, but just print something on development mode. Since this is an extension, messing with the global console object does not seem the right approach. Perhaps we can add a wrapper class:
classLogger{staticisEnabled=true;// or false on productionstaticdebug(...){Logger.isEnabled&&console.debug(...);}}
With Gulp, and depending on the context, we should be able to enabled or disable the logging.
The text was updated successfully, but these errors were encountered:
It allows to change JS/HTML/... files depending on environment
variables. It is similar to macros in C where you can inject code if
some environment variables are set. Docs: https://www.npmjs.com/package/gulp-preprocess
The preprocess will be used to enabled/disable a the logger according to
the development and production modes. See #102
* chore: Add 'preprocess' in gulp
It allows to change JS/HTML/... files depending on environment
variables. It is similar to macros in C where you can inject code if
some environment variables are set. Docs: https://www.npmjs.com/package/gulp-preprocess
The preprocess will be used to enabled/disable a the logger according to
the development and production modes. See #102
* feat(logger): Add a toggling logger mechanism for dev/prod environments
I don't think there is a need for a fancy logger, but would be nice to have
console.log
,console.debug
, ... in the code, but just print something on development mode. Since this is an extension, messing with the globalconsole
object does not seem the right approach. Perhaps we can add a wrapper class:With Gulp, and depending on the context, we should be able to enabled or disable the logging.
The text was updated successfully, but these errors were encountered: