← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 827746] Re: gnucash addon uses wrong logging approach

 

I can do better than that...

The associated gnucash addon files:
(parent branch : http://bazaar.launchpad.net/~openerp-commiter/openobject-addons/extra-6.0/)
directory gnucash

uses of notifyChannel() : gnccontent.py lines 120 and 388 (introduced at
revision 4664 by ksa, last changed revision 4672 by ksa);
gnucash_wizard.py lines 80, 82, 88, 93, and 95 (this appears to have
been the approach from the first usage, merged in at revision 3490 by
Fabien Pinckaers)

all of these uses of notifyChannel use a 3 parameter style (self,
message, object) while the correct usage for OpenERP 6 is 4 parameters
(self, name, level, msg) as shown in netsvc.py in the Logger class.
Also, the function point for notifyChannel says "notifyChannel API
shouldn't be used anymore, please use the standard `logging` module
instead", so the correct fix would be to do that instead of changing to
the 4 parameter approach.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/827746

Title:
  gnucash addon uses wrong logging approach

Status in OpenERP Modules (addons):
  Incomplete

Bug description:
  the gnucash addon uses parameters that don't work with
  netsvc.Logger.notifyChannel, three parameters (self, message, object)
  instead of four (self,name,level,msg).  And beyond that, the source
  code for netsvc.Logger.notifyChannel basically says "don't use me
  anymore" so even with the right number of parameters this would be
  incorrect.  From the commit log it looks as though at least one
  OpenERP developer, ksa, has been in the file before (and indeed made
  the notifyChannel change, previously it was a print statement) so I
  figured I'd post this rather than chasing the original dev.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/827746/+subscriptions


References