summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2023-07-19 12:53:13 +0200
committercyBerta <cyberta@riseup.net>2023-07-19 12:53:55 +0200
commit77c483116b36c76a64a737cc680f4d47f85464b1 (patch)
tree40a319aabaf50b153a12f4d53a19f39d143e392e /app/src/main
parent49742738417fb3db7e60813ca170dffaab65c8c1 (diff)
log vpn errors in logcat if app is an debug build
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java8
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java4
2 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java b/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
index f28651f3..8115548f 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
@@ -5,6 +5,8 @@
package de.blinkt.openvpn.core;
+import static se.leap.bitmaskclient.base.utils.ConfigHelper.getProviderFormattedString;
+
import android.content.Context;
import android.os.Build;
import android.os.HandlerThread;
@@ -23,8 +25,6 @@ import de.blinkt.openvpn.VpnProfile;
import se.leap.bitmaskclient.R;
import se.leap.bitmaskclient.base.utils.PreferenceHelper;
-import static se.leap.bitmaskclient.base.utils.ConfigHelper.getProviderFormattedString;
-
public class VpnStatus {
@@ -485,10 +485,6 @@ public class VpnStatus {
mLogFileHandler.sendMessage(mLogFileHandler.obtainMessage(LogFileHandler.TRIM_LOG_FILE));
}
- //if (BuildConfig.DEBUG && !cachedLine && !BuildConfig.FLAVOR.equals("test"))
- // Log.d("OpenVPN", logItem.getString(null));
-
-
for (LogListener ll : logListener) {
ll.newLog(logItem);
}
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java b/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java
index 85cdb06c..bb05810c 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java
@@ -73,6 +73,7 @@ import de.blinkt.openvpn.VpnProfile;
import de.blinkt.openvpn.core.ConnectionStatus;
import de.blinkt.openvpn.core.LogItem;
import de.blinkt.openvpn.core.VpnStatus;
+import se.leap.bitmaskclient.BuildConfig;
import se.leap.bitmaskclient.appUpdate.DownloadServiceCommand;
import se.leap.bitmaskclient.base.models.Provider;
import se.leap.bitmaskclient.base.models.ProviderObservable;
@@ -433,6 +434,9 @@ public class EipSetupObserver extends BroadcastReceiver implements VpnStatus.Sta
@Override
public void newLog(LogItem logItem) {
if (logItem.getLogLevel() == VpnStatus.LogLevel.ERROR) {
+ if (BuildConfig.DEBUG) {
+ Log.e("ERROR", logItem.getString(appContext));
+ }
switch (logItem.getErrorType()) {
case SHAPESHIFTER:
VpnProfile profile = VpnStatus.getLastConnectedVpnProfile();