[coldbox-3.8]

Question: Other than reiniting, is there any way to force a config/logbox reload ONLY? Even if it was a timed reload, say, every 15 minutes.

We want to drive our logbox config from the database, and want a way to say “Is there new db content? Ooooh, there is! Go reload just Logbox!”

The problem with this is injections.

Objects that have references to logbox appenders already will most likely not get advised about this. This is a tricky area, as you could potentially replace the entire logbox reference, but objects already created will have references to stale logbox instances. So, some objects might have it and others will not.

Maybe something to explore, as I do not know an answer top of my head.

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

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

Social: twitter.com/lmajano facebook.com/lmajano

One idea to have better control of how LogBox is created is to make your own WireBox provider that takes care of persisting the LogBox instance and can destroy and re-create it as necessary. This would be a second LogBox instance in addition to the one ColdBox creates. You would need to mange its config separately, etc.

The trick would be to always inject your special provider so no object of yours ever had an actual hard reference to LogBox. Then, every time you needed to log something, you would ask the provider for LogBox (or use onmissingMethod) like the default provider does. This would give you full control over LogBox’s persistence plus allow you to never wire Logbox directly into your components.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com