CB logger documentation?

I can't seem to find much of any documentation on the logging plugin
for CB. Am I just missing it in my searching of the docs? In
particular, I notice that my logging is being filled up with
information events every time my model is using DI, which is a lot.
I'm also interested in using it for logging my own information, having
errors emailed to me, etc but I can't seem to find much in the way of
examples or documentation.

Thanks,
Judah

"...I notice that my logging is being filled up with, information
events every time my model is using DI,..."

Do you have your "debugMode" property set to true in your Autowire
interceptor declaration? Set it to false if you don't want those
logged.

http://ortus.svnrepository.com/coldbox/trac.cgi/wiki/cbAutowireGuide#a1.Configuretheinterceptor

- Gabriel

"I can't seem to find much of any documentation on the logging plugin
for CB...I'm also interested in using it for logging my own information..."

1. The API is very useful to see all of the methods for the "logger"
plugin. Specifically, you'll probably be looking at the "logEntry" and
"logError" methods for your needs.

http://www.coldboxframework.com/api/
http://www.coldboxframework.com/api/templates/content.cfm?file=C%3A\Inetpub\vhosts\coldboxframework.com\httpdocs\builds\coldbox_2_6_3\coldbox\system\plugins\logger.cfc

2. For example:

getPlugin("logger").logEntry("error","Login without variables set detected.")

- Gabriel

I don't have debug on in my autowire interceptor declaration. Here is the xml:

<Interceptor class="coldbox.system.interceptors.autowire">
  <Property name='enableSetterInjection'>true</Property>
</Interceptor>

I'll try setting a debug property in there explicitly to false and see
if that changes things. The autowire guide says it defaults to false
however.

Judah

Good point on the api explorer, I'd forgotten about that. I'll dig
into it more closely, thanks.

Judah

Hmm. Is your "ModelsDebugMode" setting true? That logs model creation
and injections.

http://ortus.svnrepository.com/coldbox/trac.cgi/wiki/cbModelGuide#ModelConfigurationOptions

- Gabriel

I don't have that setting and when I add it, it throws an error saying
that the config no longer validates. Is that a 2.6.3 feature perhaps?
I'm running 2.6.2 currently.

:slight_smile: probably. I'm running 2.6.3.

Maybe you could post 2 or 3 lines of the DI messages you're wish were
not being logged. Someone else may see them and know what setting is
causing them to be created.

- Gabriel

Not a bad idea. Here's an example:

"information","logger-plugin","05/19/2009","13:59:47","Dependency:
{SCOPE={instance},NAME={estatementVisitTransactionGateway},TYPE={model}}
–> injected into model.estatement.estatementService."
"information","logger-plugin","05/19/2009","13:59:47","Dependency:
{SCOPE={instance},NAME={dsn},TYPE={coldbox:datasource:dsn}} -->
injected into model.estatement.estatementVisitTransactionDAO."
"information","logger-plugin","05/19/2009","13:59:47","Dependency:
{SCOPE={instance},NAME={estatementVisitTransactionDAO},TYPE={model}}
–> injected into model.estatement.estatementService."
"information","logger-plugin","05/19/2009","13:59:47","Dependency:
{SCOPE={instance},NAME={dsn},TYPE={coldbox:datasource:dsn}} -->
injected into model.estatement.estatementVisitGateway."
"information","logger-plugin","05/19/2009","13:59:47","Dependency:
{SCOPE={instance},NAME={estatementVisitGateway},TYPE={model}} -->
injected into model.estatement.estatementService."

Just basic DI stuff, nothing exciting, it just builds up the log file
quickly. I'll also see about upgrading CB soon. It has been on my list
of things to do, just not yet high enough to actually get done.

Judah