diff options
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVPNThread.java')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVPNThread.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPNThread.java b/src/de/blinkt/openvpn/OpenVPNThread.java index 67878eb7..2bdffe95 100644 --- a/src/de/blinkt/openvpn/OpenVPNThread.java +++ b/src/de/blinkt/openvpn/OpenVPNThread.java @@ -6,7 +6,10 @@ import java.io.FileWriter; import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.text.SimpleDateFormat;
+import java.util.Date;
import java.util.LinkedList;
+import java.util.Locale;
import android.util.Log;
import de.blinkt.openvpn.OpenVPN.LogItem;
@@ -58,8 +61,10 @@ public class OpenVPNThread implements Runnable { if(mDumpPath!=null) {
try {
BufferedWriter logout = new BufferedWriter(new FileWriter(mDumpPath + ".log"));
+ SimpleDateFormat timeformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.GERMAN);
for(LogItem li :OpenVPN.getlogbuffer()){
- logout.write(li.getString(null) + "\n");
+ String time = timeformat.format(new Date(li.getLogtime()));
+ logout.write(time +" " + li.getString(null) + "\n");
}
logout.close();
OpenVPN.logError(R.string.minidump_generated);
|