It seems incredibly unlikely that the actual data source name in the ColdBox data source setting would change after the application was initialized unless there is code in the app somewhere changing that setting. The settings and environment overrides are only processed once when the framework starts up and then live in memory. Now, if you were also reinitting the framework with ?fwreinit=1 then it is possible that something funky could be happening.
Since you’ve said that the only steps necessary for you to reproduce this problem are to restart your database (correct me if you’re doing more than that) then it sounds like nothing is being reloaded in ColdBox at that time.
You said the data source name was hard-coded into logger. That sounds like a very promising lead for you to explore. Based on the log levels of the appender and the categories using that appender, you will quite possibly find that the appender is only used when errors occur to log them. If you are restarting your database, that would be a prime time for code to begin erroring and then start invoking your logger to log the error. Check out a stack trace to see what code is running when the incorrect data source is referenced.
What I can’t tell you, is what data source that logger should be using since I don’t know anything about your set up. Remember, you can override LogBox settings in your environment overrides as well if you need the logBox data source to be different on your production servers.
ColdBox Platform Evangelist
Ortus Solutions, Corp