The following demo app displays all of the this.debug() messages in the
Firebug console, even though neither of the appenders is being added.
(Neither of the "Found qx.debug" console messages displays, but the initial
"Testing for qx.debug" message does display.) How/why is the Console
appender getting added? Why do the this.debug() messages display in the
console if I haven't added that appender? Intentional or a bug?

Derrell

/* ************************************************************************

   Copyright:
     (c) 2010, 2011 Derrell Lipman

   License:
     LGPL: http://www.gnu.org/licenses/lgpl.html
     EPL: http://www.eclipse.org/org/documents/epl-v10.php
     See the LICENSE file in the project's top-level directory for details.

   Authors:
     * Derrell Lipman (derrell)

#asset(timezonedate/*)

************************************************************************ */

/**
 * This is the main application class of the demo for "timezonedate"
 */
qx.Class.define("timezonedate.demo.Application",
{
  extend : qx.application.Standalone,

  members :
  {
    /**
     * This method contains the initial application code and gets called
     * during startup of the application
     *
     * @lint ignoreDeprecated(alert)
     */
    main : function()
    {
      var appender;

      // Call super class
      this.base(arguments);

      // Enable logging in debug variant
console.log("Testing for qx.debug");
      if (typeof(qx.core.Variant) !== "undefined")
      {
        if (qx.core["Variant"].isSet("qx.debug", "on"))
        {
console.log("Found qx.debug VARIANT");
          appender = qx.log.appender.Native;
          appender = qx.log.appender.Console;
        }
      }

      // Enable logging in debug environment
      if (typeof(qx.core.Environment) !== "undefined")
      {
        if (qx.core["Environment"].get("qx.debug"))
        {
console.log("Found qx.debug ENVIRONMENT");
          appender = qx.log.appender.Native;
          appender = qx.log.appender.Console;
        }
      }

      var tzDate;

      this.debug("test 1");
      tzDate = new timezonedate.TimezoneDate(0);
      if (this.assertEquals)
      {
        this.assertEquals((new Date(0)).getTime(), tzDate.getTime());
      }
      this.debug("date: " + tzDate);

      this.debug("test 2");
      tzDate = new timezonedate.TimezoneDate("1970-01-01T00:00Z");
      if (this.assertEquals)
      {
        this.assertEquals((new Date(0)).getTime(), tzDate.getTime());
      }
      this.debug("date: " + tzDate);

      this.debug("test 3");
      tzDate = new timezonedate.TimezoneDate("1970-01-01T04:00-04:00");
      tzDate.setOutputFormatter(tzDate.constructor._formatRfc2822);
      if (this.assertEquals)
      {
        this.assertEquals((new Date(0)).getTime(), tzDate.getTime());
      }
      this.debug("date: " + tzDate);
      this.debug(tzDate.format(240));
    }
  }
});
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to