1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-14 11:42:23 -05:00

Allow directory in logFilePath settings, add /davmail.log suffix in this case

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@773 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-10-08 21:59:48 +00:00
parent baa5dcb814
commit 7c439595e2

View File

@ -147,9 +147,15 @@ public final class Settings {
public static String getLogFilePath() {
String logFilePath = Settings.getProperty("davmail.logFilePath");
// use default log file path on Mac OS X
if ((logFilePath == null || logFilePath.length() == 0)
&& System.getProperty("os.name").toLowerCase().startsWith("mac os x")) {
logFilePath = System.getProperty("user.home") + "/Library/Logs/DavMail/davmail.log";
if ((logFilePath == null || logFilePath.length() == 0)) {
if (System.getProperty("os.name").toLowerCase().startsWith("mac os x")) {
logFilePath = System.getProperty("user.home") + "/Library/Logs/DavMail/davmail.log";
}
} else {
File logFile = new File(logFilePath);
if (logFile.isDirectory()) {
logFilePath += "/davmail.log";
}
}
return logFilePath;
}