Hi Daniel! This is great! Now I understand and like it. I've even made an appender class and it is registered to the logger.
A sidenote about the documetation: while the API doc for the Logger.register function refers to the required appender class to be static and to have at least a process() method (suggesting the method has no parameter), the real requirement is a function with one parameter (entry). But this could be found out only by checking any of the concrete implementations (Console or Native). If there would be none, one could hardly find out how to implement the appender correctly. The other information I seek is the definition of the entry. I was able to find out that the entry has several fields ( time, level, items, win, clazz (;-)), etc.) I've found the entry specification also missing. What I couldn't find out is much simpler: I "throw" a log message by calling for example the this.debug( "test" ), and I would like to put into my log window the text "test". I see (or at least I guess that I see the message to arrive to the appender, but wasn't able to find the message itself. What is the magic word? ;-) Thanks, Balage ----- Original Message ---- From: Daniel Wagner <[email protected]> To: qooxdoo Development <[email protected]> Sent: Wed, December 9, 2009 5:48:08 PM Subject: Re: [qooxdoo-devel] Logging in qooxdoo Hi Balage, logging in qooxdoo is split up into a central logging engine (the static class qx.log.Logger) which receives and dispatches log messages, and one or more log appenders which do the actual processing, such as storing and/or displaying messages. The debug/info/warn/error methods that each qooxdoo object inherits from qx.core.Object call the corresponding methods of qx.log.Logger, which in turn calls the process() method of all appenders that are registered with it. A typical qooxdoo application will register two appenders: qx.log.appender.Native uses the browser's own logging capabilities (Firebug etc.) while qx.log.appender.Console is useful for browsers without such tools. It is opened by pressing F7. If those or the other appenders found in the qx.log.appender namespace aren't enough for your needs, you can always write your own appender. I suggest looking at the source of qx.log.appender.Element for inspiration. There's no need to use console.log directly in your application: The native logger uses it if the browser supports it, preventing any exceptions if it isn't. Regards, Daniel [email protected] schrieb: > Hi everyone! > > I have a quite silly question: I tried to figure out, how the logging > system works. > I found the methods debug, info, warning and error of the Object, and > the console.log function. > The later seems to work only with Firefox and Firebug, but having a > console.log call in the source makes the application to throw exception > when opening from other browsers. > OTOH, I wasn't able to find whrere it goes and how I could get the > results produced by Object methods. > > I tried to find info, but starting to realize, that many of the > documentation (called "Manual") of Qooxdoo is rather a very high level > summary of the features than a manual. > > Thank you! > > Balage > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Return on Information: > Google Enterprise Search pays you back > Get the facts. > http://p.sf.net/sfu/google-dev2dev > > > ------------------------------------------------------------------------ > > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
