* Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
* Process DSL functions via LogBox
component accessors="true" {
property name="injector";
* Configure the DSL Builder for operation and returns itself
* @injector The linked WireBox Injector
* @injector.doc_generic coldbox.system.ioc.Injector
* @return coldbox.system.ioc.dsl.IDSLBuilder
function init( required injector ){
variables.injector = arguments.injector;
variables.logBox = variables.injector.getLogBox();
variables.log = variables.injector.getLogBox().getLogger( this );
* Process an incoming DSL definition and produce an object with it
* @definition The injection dsl definition structure to process. Keys: name, dsl
* @targetObject The target object we are building the DSL dependency for. If empty, means we are just requesting building
* @targetID The target ID we are building this dependency for
* @return coldbox.system.ioc.dsl.IDSLBuilder
function process( required definition, targetObject, targetID ){
var thisType = arguments.definition.dsl;
var thisTypeLen = listLen( thisType, ":" );
// logbox:root and logbox:logger
var thisLocationKey = getToken( thisType, 2, ":" );
switch ( thisLocationKey ) {
return variables.logbox.getRootLogger();
return variables.logbox.getLogger( arguments.definition.name );
var thisLocationType = getToken( thisType, 2, ":" );
var thisLocationKey = getToken( thisType, 3, ":" );
// DSL Level 2 Stage Types
switch ( thisLocationType ) {
// Check for {this} and targetobject exists
if ( thisLocationKey eq "{this}" AND structKeyExists( arguments, "targetObject" ) ) {
return variables.logBox.getLogger( arguments.targetObject );
// Normal Logger injection
return variables.logBox.getLogger( thisLocationKey );