Monday, January 17, 2011

JS Logger 1.0.1 - logParams

Note: This now has a new name, Console Wrapper, and has been moved to a Google project. Please go to for more information.

I've updated my JavaScript Console Logger package to include a new function called logParams. logParams will automatically log all the parameters in your function. This can save a lot of time since you don't need to manually list all the parameters and it will detect any "extra" parameters.

Here's an example of the code:
function myFn(px, py, pz){
  //do something as part of this function

//Not required if using in APEX. 
//If called from APEX it will detect if you are in debug mode

//Call myFn with the correct amount of parameters

//Call myFn with more than "expected" number of parameters
myFn(1,2,3,'hello', 'goodbye');
Which results in:

Note: by default the parameters groups are collapsed by I've expanded them for this demo

Download Javascript Console Logger $logger.1.0.1. For more information about this javascript library please read my original post:

Thanks to Dan McGhan for helping come up with this idea.

1 comment:

  1. Thanks,
    A very nice feature.
    That's what I really miss in PL/SQL