Hey hey @ghost
mind elaborating on your method? Is debug assuming it's an environment variable that puts the app in a certain state in which it console logs? I'm just unsure how this exactly works.
As per the example I included, usually you'd set the log level through an env variable. This would let you boot set a deployed app to debug / trace level without redploying.
Hey hey @ghost mind elaborating on your method? Is debug assuming it's an environment variable that puts the app in a certain state in which it console logs? I'm just unsure how this exactly works.
Thanks for your feedback :)
In my example,
debug
is used for demonstration purposes as a placeholder for whatever condition you use to log.For instance, let's say if the global variable
debug
is set to true, then the script in question should log as much as possible, else it shouldn't.Full Disclosure: I am primarily a .NET developer and only have limited experience with JS.
Gotcha, thanks David for elaborating :)
As per the example I included, usually you'd set the log level through an env variable. This would let you boot set a deployed app to debug / trace level without redploying.
As per: 12factor.net/config