Skip to content
Julio Makdisse Saito edited this page Sep 12, 2014 · 3 revisions

mogger.traceObj ( configurations ): void

Registers an object to be observed.


mogger.traceObj({
    targetTitle: 'SIMPLE_OBJ_1',
    before: { message: 'Simple Obj 1' },
    localBeforeConfig: {
        css: 'color: #933; font-size: 14px',
        size: 30
    },
    localTargetConfig: {
        css: 'color: #393; font-size: 14px'
    },
    localInterceptors: [
        {
            filterRegex: /^a.*/i,
            callback: function(info) {
                return 'this method starts with "a" -> ' + info.method;
            }
        }
    ],
});
  • configuration parameter:

    • targetTitle: this string will be fetched in the surrogateTargets array

    • before: defines the title configurations

      • message: Title
    • localBeforeConfig object: defines the title configurations

      • css: css for the title
      • size: defines how many characters will be used for this field. If the number of characters exceeds, will include a "...". If the number of characters is less will be filled with spaces.
  • localTargetConfig: defines the target configurations

    • css: css for the target
    • size: defines how many characters will be used for this field. If the number of characters exceeds, will include a "...". If the number of characters is less will be filled with spaces.
+ **localInterceptors** array: defines all local interceptors
   + objects with:
       + **filterRegex**: method name regex filter
       + **callback**: The "callback" function takes as argument an object called "info" that has all the arguments and the method name. The return of this function will be displayed replacing the method name.
Clone this wiki locally