RE: [coldbox:15123] Re: [logbox-1.6] Appender Log Level Change Not Affecting Application

Hmm, I’m still tying to absorb everything you have going on there.

On a sort-of-related note, if you are using LogBox inside a ColdBox app and are simply trying to use different settings in your dev environment, have you looked into the environment override functionality built into the coldbox.cfc config file?

Bascially, if you have this in your config:

environments = {
development = “^dev.,^devadmin.,^devwww.”,
stage = “^stage.,^stageadmin.,^stagewww.”
};

function development()
{
logbox.appenders.email.levelMax = ‘DEBUG’;
logbox.appenders.email.properties.to = ‘devErrors@company.com’;
}

function stage()
{
logbox.appenders[“email”].levelMax = ‘INFO’;
logbox.appenders[“email”].properties.to = ‘stageErrors@company.com’;
}

When ColdBox starts up, it checks the list of regex against the current URL and determines what environment you’re on. Then, after running the main configure() method in your config, if runs the appropriately named environment-specific method which gives you a chance to override any values in the config struct that you want.

Thanks!

~Brad