projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #186 from owncloud/fixed_contradicted_messages_in_login_view
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
Log_OC.java
diff --git
a/src/com/owncloud/android/Log_OC.java
b/src/com/owncloud/android/Log_OC.java
index
f65ed17
..
1e2937c
100644
(file)
--- a/
src/com/owncloud/android/Log_OC.java
+++ b/
src/com/owncloud/android/Log_OC.java
@@
-11,8
+11,10
@@
import java.util.Locale;
import android.util.Log;
import android.util.Log;
+
public class Log_OC {
public class Log_OC {
+
private static boolean isEnabled = false;
private static File logFile;
private static File folder;
private static boolean isEnabled = false;
private static File logFile;
private static File folder;
@@
-59,8
+61,7
@@
public class Log_OC {
}
public static void startLogging(String logPath) {
}
public static void startLogging(String logPath) {
-
- folder = new File(logPath+File.separator+"log");
+ folder = new File(logPath);
logFile = new File(folder+File.separator+"log.txt");
if (!folder.exists()) {
logFile = new File(folder+File.separator+"log.txt");
if (!folder.exists()) {
@@
-83,7
+84,8
@@
public class Log_OC {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss",Locale.getDefault());
String currentDateandTime = sdf.format(new Date());
if (logFile != null) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss",Locale.getDefault());
String currentDateandTime = sdf.format(new Date());
if (logFile != null) {
- logFile.renameTo(new File(folder+File.separator+"log_"+currentDateandTime));
+ logFile.renameTo(new File(folder+File.separator+"Owncloud_"+currentDateandTime+".log"));
+
isEnabled = false;
try {
buf.close();
isEnabled = false;
try {
buf.close();
@@
-111,8
+113,8
@@
public class Log_OC {
buf.newLine();
} catch (IOException e) {
e.printStackTrace();
buf.newLine();
} catch (IOException e) {
e.printStackTrace();
-
}
-
}
+ }
+ }
}
}