Not sure how many folks are using the DBAppender but I noticed a
thread safety bug in it:
<cffunction name="checkColumnMap" output="false" access="private"
returntype="void" hint="Check a column map definition">
<cfscript>
var map = getProperty('columnMap');
for(key in map){
if( NOT listFindNoCase(instance.columns,key) ){
$throw(message="Invalid column map key: #key#",detail="The
available keys are
#instance.columns#",type="DBAppender.InvalidColumnMapException");
}
}
</cfscript>
</cffunction>
The key variable is not declared VAR.
And while I'm in this file, I also noticed the following variable is
unused in logMessage():
var type = "cf_sql_tinyint";
Sean
Me again!
Looks like the DBAppender does not support custom layouts. All the
other appenders have logic like this:
if( hasCustomLayout() ){
entry = getCustomLayout().format(loge);
}
else{
entry = ... standard formatting ...;
}
DBAppender alone does not do this. Well, ScopeAppender doesn't either
but it can save extraInfo as objects so it doesn't need it.
Sean
...to clarify... I can sort of see why it just takes the basic
elements of the logEvent as-is to push into the columns in the DB, but
there's no way to apply custom formatting to extraInfo - you're stuck
with .toString(). I can see how a custom layout wouldn't quite work
with DBAppender but it would be nice to be able to format extraInfo
nicely...
Sean
Thanks Sean, creating another ticket for this.
Thanks
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
Thanx but I'm not in a position to upgrade ColdBox at this point in
the project. We'll do that in a post-launch phase at some point, once
3.0.0 goes gold.
We'll do that in a post-launch phase at some point, once
3.0.0 goes gold.
How many records does Luis have to sell for that to happen?
~Brad