Polish recent changes to Log4jWebConfigurer
Reordered inline comments so that they now apply to current state of the code. Added logger entry in testlog4j.properties to avoid console warning. Issue: SPR-9417
This commit is contained in:
@@ -122,11 +122,14 @@ public abstract class Log4jWebConfigurer {
|
||||
if (location != null) {
|
||||
// Perform actual log4j initialization; else rely on log4j's default initialization.
|
||||
try {
|
||||
// Return a URL (e.g. "classpath:" or "file:") as-is;
|
||||
// consider a plain file path as relative to the web application root directory.
|
||||
// Resolve system property placeholders before potentially
|
||||
// resolving a real path.
|
||||
location = SystemPropertyUtils.resolvePlaceholders(location);
|
||||
|
||||
// Leave a URL (e.g. "classpath:" or "file:") as-is.
|
||||
if (!ResourceUtils.isUrl(location)) {
|
||||
// Resolve system property placeholders before resolving real path.
|
||||
// Consider a plain file path as relative to the web
|
||||
// application root directory.
|
||||
location = WebUtils.getRealPath(servletContext, location);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user