LOGGING-147 - SimpleLog.log - unsafe update of shortLogName
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/logging/trunk@1363173 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -22,6 +22,7 @@ LOGGING-130 - Potential missing privileged block for class loader
|
|||||||
LOGGING-145 - LogFactoryImpl.setAttribute - possible NPE
|
LOGGING-145 - LogFactoryImpl.setAttribute - possible NPE
|
||||||
LOGGING-142 - Log4JLogger uses deprecated static members of Priority such as INFO
|
LOGGING-142 - Log4JLogger uses deprecated static members of Priority such as INFO
|
||||||
LOGGING-128 - Static analysis suggests a number of potential improvements
|
LOGGING-128 - Static analysis suggests a number of potential improvements
|
||||||
|
LOGGING-147 - SimpleLog.log - unsafe update of shortLogName
|
||||||
|
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
|
|||||||
@@ -311,9 +311,8 @@ public class SimpleLog implements Log, Serializable {
|
|||||||
if( showShortName) {
|
if( showShortName) {
|
||||||
if( shortLogName==null ) {
|
if( shortLogName==null ) {
|
||||||
// Cut all but the last component of the name for both styles
|
// Cut all but the last component of the name for both styles
|
||||||
shortLogName = logName.substring(logName.lastIndexOf(".") + 1);
|
String slName = logName.substring(logName.lastIndexOf(".") + 1);
|
||||||
shortLogName =
|
shortLogName = slName.substring(slName.lastIndexOf("/") + 1);
|
||||||
shortLogName.substring(shortLogName.lastIndexOf("/") + 1);
|
|
||||||
}
|
}
|
||||||
buf.append(String.valueOf(shortLogName)).append(" - ");
|
buf.append(String.valueOf(shortLogName)).append(" - ");
|
||||||
} else if(showLogName) {
|
} else if(showLogName) {
|
||||||
|
|||||||
Reference in New Issue
Block a user