summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/LogFileHandler.java8
-rwxr-xr-xmain/src/main/res/values/strings.xml1
2 files changed, 8 insertions, 1 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/LogFileHandler.java b/main/src/main/java/de/blinkt/openvpn/core/LogFileHandler.java
index da9cb6ef..9f63785c 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/LogFileHandler.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/LogFileHandler.java
@@ -20,6 +20,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Locale;
+import de.blinkt.openvpn.R;
import de.blinkt.openvpn.fragments.Utils;
/**
@@ -45,6 +46,8 @@ class LogFileHandler extends Handler {
public void handleMessage(Message msg) {
try {
if (msg.what == LOG_INIT) {
+ if (mLogFile != null)
+ throw new RuntimeException("mLogFile not null");
readLogCache((File) msg.obj);
openLogFile((File) msg.obj);
} else if (msg.what == LOG_MESSAGE && msg.obj instanceof VpnStatus.LogItem) {
@@ -109,7 +112,6 @@ class LogFileHandler extends Handler {
if (!logfile.exists() || !logfile.canRead())
return;
- VpnStatus.logDebug("Reread log items from cache file");
try {
@@ -146,7 +148,11 @@ class LogFileHandler extends Handler {
VpnStatus.logError("Too many logentries read from cache, aborting.");
read = 0;
}
+
}
+ VpnStatus.logDebug(R.string.reread_log, itemsRead);
+
+
} catch (java.io.IOException | java.lang.RuntimeException e) {
VpnStatus.logError("Reading cached logfile failed");
diff --git a/main/src/main/res/values/strings.xml b/main/src/main/res/values/strings.xml
index ec3449eb..85bf1128 100755
--- a/main/src/main/res/values/strings.xml
+++ b/main/src/main/res/values/strings.xml
@@ -404,4 +404,5 @@
<string name="missing_certificates">Missing user certificate or user certifcate key file</string>
<string name="missing_ca_certificate">Missing CA certificate</string>
<string name="crl_title">Certifcate Revoke List (optional)</string>
+ <string name="reread_log">Reread (%d) log items from log cache file</string>
</resources>