Logbox question: How long do "coldboxTracer" messages exist with production settings or not meant for production?

CF9, CB 3.0SVN

A. Setup - I'm testing with production settings (debugmode=false) and
I create an error here and there, and I keep testing.

5 minutes later, I open up a different browser (so different session)
and, in that session, I "debugmode=true". When I do that, the "Coldbox
Tracer Messages" show the errors I created in the original session.

B. My question is, do these messages go away at some point or is the
"coldboxTracer" appender not intended for use in a production
environment?

It appears to me that, with production settings, the messages are
simply accumulating. So I wonder if they are flushed at some point or
if the intention that the coldboxTracer appender only be used during
development.

Thank you,
Gabriel

Gabriel,

The Tracer Appender should NOT be used in production as it only is used to send logging to the coldbox debugger. It has a limit internally of 75 tracers, then it recycles.

Overall, it is good practice to NOT have the ColdBox tracer appender in production.

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

Noted. Thank you!

- Gabriel

Hi Luis,

Just wanted to verify the following as it'll be useful to anyone who read this.

I'm seeing that, if I remove all logbox configuration from my
Coldbox.cfc, the "ColdboxTracer" is appended to the root logger.
Because of this, you have to _explicitly_ remove it in production.

Thank you,
Gabriel

Man, it feels like if you where reading my mind!!

I was just looking at the default logbox config in the coldbox core and the default appender is the coldbox tracer appender. So here is the question, should that be there by default? Or should it be another appender.

My opinion might be that you should explicitly eliminate it if you like in the application config and not rely on the core default setting. which is just the basics.

Thoughts?

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

Brainstorming: My concern is that, by default, the tracer appender is
needlessly doing stuff in production. So, for someone new to the
framework, using, say, only MVC, they'd have the tracer appender doing
it's thing and filling up with 75 tracers.

So my thought would be to have no default appender or, if one is
required, a "do nothing" appender. That way, that new user would
graduate to enabling appenders rather than having to learn how to turn
it off.

- Gabriel

Good point. Thanks

I was thinking about a NoOp appender the other day. I noticed it in a
Log4Net setup here at work and wondered about it as first but then as
I pondered it, it started to make more sense. I'm thinking that a good
production default is to have a AsyncRollingFileAppender (and maybe
EmailAppender) for Error and Fatal and then a NoOp Appender for Info
and Warn.

That would encourage a best practice where you log pretty much
everything in your code, mostly with Info statements. In development,
you'd get good feedback about the state of your system and have a very
fine-grained view of the changes in state. Then, when you put it in
Production, it would just toss most of that information. And if you
determined that something funky was going on, all you'd need to do is
change the NoOp Appender to some sort of File Appender and you'd have
robust debugging in Production with no changes to your application
code.

Judah

Luis,

Name needs to be changed for consistency in Logbox.xml (Changeset
2901). It's still "ColdboxTracer"

<Appender name="ColdboxTracer"
class="coldbox.system.logging.appenders.ConsoleAppender" />

- Gabriel