Methods

SuperCamoLogger(message, caller)

Configured logging system for the SuperCamo package.

Pass a string to this, and it'll automatically figure out which NodeJS util.DebugLogger to use.

This is not something for users of the SuperCamo package to directly use. Instead, this is something impacted by usage of the NODE_DEBUG environment variable.

For example, if you want logging from multiple packages, including SuperCamo, you may want to set NODE_DEBUG to be or include "verbose". This would enable multiple packages to log. But if you only want SuperCamo to log, and not any other packages, you may want to set NODE_DEBUG to be or include "supercamo".

Parameters:
NameTypeDescription
messageString

The string to log.

caller"Client" | "BaseDocument" | "Document" | "EmbeddedDocument" | "Validators" | "Root" | ""

Specific string to help with conditional logging, eg. "Client" to allow the SuperCamoClient logger to log. Defaults to "", which will allow the SuperCamo catch-all logger and Verbose generic logger to log.

Author
  • BigfootDS
Examples

Running your app with this command would enable logging for anything that uses "verbose" in its util logger:

NODE_DEBUG=verbose node ./index.js	

Running your app with this command would enable logging for just SuperCamo, NodeJS "fs", and NodeJS "network" libraries:

NODE_DEBUG=supercamo,fs,network node ./index.js