m5 to m6 upgrade breaks logging?

I find this odd. I upgraded from M5 to M6 by deleting the existing M5
and unzipping M6 to the same directory. Now, when my app references a
logger that previously worked, I am getting an error stating that the
variable logger is undefined. I can't believe the upgrade really broke
logging, but did I do something wrong with the upgrade that is causing
this issue?

This is how it is wired into Main.cfc:

Did u restart CF?

You need to use the inject attribute of cfproperty instead of type.

– sent by a little green robot

changing the property from type to inject seems to have done the trick
(i've tested only one class, thus far). the coldbox documentation does
not even list inject as an attribute, and all the samples use type.
so, my question now is, should all injected properties be changed from
the type attribute to the inject attribute?

for others coming to this post, i changed the properties to the
following:
  <cfproperty name="logBox" inject="logbox" />
  <cfproperty name="logger"
inject="logbox:logger:owners.handlers.Main" />

Cool, glad it worked :slight_smile:

I tend to only use the wiki site for docs as they are more up-to-date. Here’s the method of the inject attribute in the compatibility guide.
http://wiki.coldbox.org/wiki/Compatibility:3.0.0.cfm#New_Autowire_Annotation

Bill,

We have discussed this a number of times on this list, please read.

http://wiki.coldbox.org/wiki/WhatsNew:3.0.0.cfm#Updated_Dependency_Injection
_DSL

Regards,
Andrew Scott
http://www.andyscott.id.au/

From: coldbox@googlegroups.com [mailto:coldbox@googlegroups.com] On
Behalf Of Bill Turner
Sent: Sunday, 3 October 2010 6:31 AM
To: ColdBox Platform
Subject: [coldbox:6055] Re: m5 to m6 upgrade breaks logging?

changing the property from type to inject seems to have done the trick

(i've