jsnlog icon indicating copy to clipboard operation
jsnlog copied to clipboard

Instrument feature for functions

Open mperdeck opened this issue 11 years ago • 0 comments

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:

  1. surround with try catch (catch exception, log it, rethrow with a flag saying it has been logged to prevent relogging)
  2. log parameter values (DEBUG logger)
  3. try finally to measure execution time of the function

mperdeck avatar Mar 09 '14 11:03 mperdeck