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
  <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.


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


Andrew Scott

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