try
{
ConfigWatchDog configWatchDog = null;
if (ccl instanceof MuleApplicationClassLoader)
{
MuleApplicationClassLoader muleCL = (MuleApplicationClassLoader) ccl;
// check if there's an app-specific logging configuration available,
// scope the lookup to this classloader only, as getResource() will delegate to parents
// locate xml config first, fallback to properties format if not found
URL appLogConfig = muleCL.findResource("log4j.xml");
if (appLogConfig == null)
{
appLogConfig = muleCL.findResource("log4j.properties");
}
final String appName = muleCL.getAppName();
if (appLogConfig == null)
{
// fallback to defaults
String logName = String.format("mule-app-%s.log", appName);
File logDir = new File(MuleContainerBootstrapUtils.getMuleHome(), "logs");