jsnlog
jsnlog copied to clipboard
Instrument feature for functions
Feature that allows you to instrument all functions in a namespace (which is a variable containing an object that contains members of type function). Option to only instrument those functions whose names match one of a list of regexs (only works if the functions are not anonymous).
Instrumentation options:
- surround with try catch (catch exception, log it, rethrow with a flag saying it has been logged to prevent relogging)
- log parameter values (DEBUG logger)
- try finally to measure execution time of the function