noob: autowiring logging

I copied this right out of some documentation, but it throws error Expression in cfproperty value must have a constant value. Here is the code that is at the top of my handler:

I know its a error but you try like this

property name=“logbox” inject=“logbox”;

public void function onDIComplete(){
variables.log = logbox.getLogger(getMetadata(this).name);
}

That is why it works in Railo, sorry about that, cf9 does not like dynamic properties, which is a shame.
Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

I am still confused here. Doing as Sana suggests, I still get an error: Variable LOGGER is undefined. It is unclear from his statement whether or not he expects an error.

And, Luis, your remark has not clarified it for me, either. Are you stating that what Sana has suggested will not work in CF9? Or the documented solution I tried will not work in CF9?

In either case, I am no closer to a solution and am unsure how I should set this up.

I can, of course, just hardcode the category, for example:

This works just fine.