Logging in custom widgets

A lot of the custom made widgets make use of the logger.<loglevel> methods to add some logging mostly for debug purposes. However, we have no idea to which lognode this output is written? Could anyone shine a light on where we can find these log messages?
3 answers

On startup the client initializes a global logger object. Depending on whether or not djConfig.isDebug is true or false it will initialize an active logger or a stub one. The stub logger just consumes messages and doesn't log them anywhere. It defaults to false but is set to true in index-console.html - look in the header to see how it's set.

If you have an active logger you can specify the level of logging on the Firebug command line (1,2,3,4 which correspond to debug, info, warn and error respectively).


By default logging goes to the active console. If you are using Firebug, the log messages will appear in the Firebug console. If you are using IE the Firebug-Lite version will be loaded and debug messages will appear there.

If the number of log messages coming by at the log level you need you can filter them using logger.filter - this function accepts either a String or a Regex. For example, to filter out everything but messages containing the word 'mendix' (case-insensitive),


To reset the filter, just call the function with no arguments.


if you go to index-console.html a lot of the debug information is printed to the firebug console.


I was trying to get logging to work while developing a widget and using the logger.debug statement in the widget's javascript. I then did some reading of the FireBug help file and realised that if you want to see your logging in the FireBug console you must use console.debug and then FireBug displays all your logging in the consile window.