Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328107 - [client] Consider removing or simlifying qooxdoo logging
Summary: [client] Consider removing or simlifying qooxdoo logging
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.4 M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 327542 334555
  Show dependency tree
 
Reported: 2010-10-19 05:34 EDT by Tim Buschtoens CLA
Modified: 2011-02-01 09:20 EST (History)
1 user (show)

See Also:


Attachments
empty implementation of Logger.js (1.30 KB, text/x-c)
2010-10-19 06:36 EDT, Tim Buschtoens CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Buschtoens CLA 2010-10-19 05:34:09 EDT
Qooxdoo logging is made up of at least 9 classes. Its debatable if we need all of those, especially in the build-variant. In theory we wouldn't need them at all, as all modern browser support console.log in one way or another. Only older IE might need a pop-window as logger.
Comment 1 Tim Buschtoens CLA 2010-10-19 06:01:44 EDT
In most cases, logging calls are done using the MLogging Mixin, which is easy to replace. But there are three other methods:

- qx.log.Logger.ROOT_LOGGER is used by Class.js ans StyleSheet.js
- qx.log.Logger.getClassLogger(...).debug is used by Exchange.js and Widget.js
- qx.log.Logger.deprecatedMethodWarning is used by 7 classes total.

Also, BoxSizing.js uses "qx.log.Logger.warn", which is probably a mistake since that method does not exist.
Comment 2 Tim Buschtoens CLA 2010-10-19 06:20:34 EDT
I missed qx.core.Log which seems to be a subset of the Firebug-lite implementation.
Comment 3 Tim Buschtoens CLA 2010-10-19 06:36:14 EDT
Created attachment 181166 [details]
empty implementation of Logger.js

Loading this file instead of the original Logger.js, allowes to safely remove these classes from the client:

qx.core.Log
qx.log.DefaultFilter
qx.log.Filter
qx.Log.EventProcessor
qx.log.appender.Abstract
qx.log.appender.FireBug
qx.log.appender.Native
qx.log.appender.Window

This could be used for the build-variant only, while still using the original classes for the debug-variant. Alternatively, all of these classes could be removed for good with a slim implementation of Logger.js that logs directly to the console, if it exsits. Optionally, this implementation could support log-level, and logging to a popup-window if no console exists. (I personally don't think there is any need for log-level, but there seems to be no way around a pop-window for IE6.)
Comment 4 Tim Buschtoens CLA 2010-10-26 09:04:52 EDT
Ah, "qx.dev.StackTrace" could probably also be removed. (I didn't try it though.)
Comment 5 Tim Buschtoens CLA 2011-01-17 12:46:28 EST
We agreed to remove the entire qooxdoo logging, including the printStackTrace implementation.
Comment 6 Tim Buschtoens CLA 2011-02-01 09:11:27 EST
Fixed in CVS HEAD.

After some consideration i decided to leave a very thing implementation of the api in Object.js in case some custom-widget developer are still using it. It can be removed at any time, no RAP code is using it.
Comment 7 Rüdiger Herrmann CLA 2011-02-01 09:20:44 EST
Yeah :)