* @throws IOException\r
*/\r
public String setAppender(String appender) throws IOException {\r
- String filename;\r
int i = 0;\r
File f;\r
- while ((f = new File(filename = String.format(FILE_FORMAT_STR, dir, root, appender, ending, i))).exists()) {\r
+ while ((f = new File(String.format(FILE_FORMAT_STR, dir, root, appender, ending, i))).exists()) {\r
++i;\r
}\r
- ;\r
+ \r
f.createNewFile();\r
- System.setProperty("LOG4J_FILENAME_" + appender, filename);\r
+ System.setProperty("LOG4J_FILENAME_" + appender, f.getCanonicalPath());\r
return appender;\r
}\r
\r