Building a better console log (tree view); here are the obstacle definitions..

Discussion in 'JavaScript' started by rene7705, Jan 13, 2013.

  1. #1
    Hi folks..

    For my opensourced webdevelopers framework at fancywebapps dot com, I want to create a better console log for web applications..

    I've made a mockup of what I want the user-interface to become; http://freegemini.me/sites/fancywebapps.com/fancywebapps/com/hipLog/

    The basic premise I want to work from is "grouping all the console messages for a specific user action" (such as a page load, a button press, etc), and to present the console debug information as an expansible/collapsable tree view, not a flat list..

    The basic problems I got are;

    (1) You can't request trace information back into a javascript object, you can only have it dumped to the console. at most, in current browsers
    (2) I've found it as yet impossible to effectively pass a "userAction context object" through the entire function stacks that make up my own framework.
    (3) I've found it as yet impossible to effectively pass a "userAction context object" through
    (3.1) specific functions called with setTimeout (myObj.someMethod, milliSecondsCount);
    (3.2) anonymous functions called with setInterval(...) or setTimeout (function () { myObj.someMethod(someParam); }, milliSecondsCount);
    (3.3) anonymous functions called immediately; function (someParam) { /* work with someParam */ } (someParam);
    (4) I don't understand the nitty gritty of javascript exceptions enough to exploit those (maybe someone can enlighten me here)

    I hope some javascript expert here will be able to guide me in the right direction. Once these basic fundamental problems are explained to me, I can write the code myself, and even credit you for your advice in the source-code and about section of this new component.

    BTW, I've already got accumulation of all PHP errors in $_SESSION['errors'] going, from the earlier version of this better-log component when it was still called "logAndHandler". So capturing the PHP errors for display in the browser is EASY :)

    With regards,
    Rene
     
    rene7705, Jan 13, 2013 IP