Be more lax with --debug parsing

This commit is contained in:
Dave Syer
2013-11-05 10:21:54 +00:00
parent c6efac87f5
commit 5ab2b472a8

View File

@@ -156,7 +156,10 @@ public class AutoConfigurationReport implements ApplicationContextAware,
}
private boolean shouldLogReport() {
return this.context.getEnvironment().getProperty("debug", Boolean.class, false)
String debug = this.context.getEnvironment().getProperty("debug", "false")
.toLowerCase().trim();
return debug.equals("true") || debug.equals("") //
// inactive context is a sign that it crashed
|| !this.context.isActive();
}