Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#841 closed defect (fixed)

dojo.debug questionable write of "DEBUG" string

Reported by: [email protected] Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

I noticed when starting to use dojo.log.Logging to write debug/error/warning/etc messages that the String "DEBUG" was being printed out twice because dojo.logging.Logger writes statements via dojo.debug..

Dojo.debug should probably either not print the string DEBUG or Logger should actually use dojo.hostenv.println to print statements. I'm going to go with option #2 as the best mechanism as it will give users of either logging facility consistent behaviour.

Attachments (1)

dojo-logging-patch.txt (1008 bytes) - added by [email protected] 14 years ago.
Patch for Logging.js

Download all attachments as: .zip

Change History (4)

Changed 14 years ago by [email protected]

Attachment: dojo-logging-patch.txt added

Patch for Logging.js

comment:1 Changed 14 years ago by [email protected]

The above referenced patch replaced the if/else logic in Logger.emit to only check for the global defintion of "hostenv.println" before using it to print output. This satisfies browser/rhino as well as not having duplicate "DEBUG DEBUG mesage " log type statements.

It also adds a quick check in the begging on the emit function for djConfig.isDebug and returns immediately if not true.

comment:2 Changed 14 years ago by dylan

Resolution: fixed
Status: newclosed

comment:3 Changed 13 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.