diff options
author | Arne Schwabe <arne@rfc2549.org> | 2016-03-17 10:32:30 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2016-03-22 10:13:12 +0100 |
commit | f3e094ce28feeaa3ba057b3260a2c0f15f401ff6 (patch) | |
tree | 9cfd7d7da2afcbd04d81de56a1e358e030e765b8 /main/src | |
parent | a7d9f82ace6abc19dbc4b9a390a91f70dd76d1bc (diff) |
Better debug logging
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java | 2 | ||||
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java index a70e71f2..7fd43906 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java @@ -69,7 +69,7 @@ public class OpenVPNThread implements Runnable { try {
Log.i(TAG, "Starting openvpn");
startOpenVPNThreadArgs(mArgv, mProcessEnv);
- Log.i(TAG, "Giving up");
+ Log.i(TAG, "OpenVPN process exited"); } catch (Exception e) {
VpnStatus.logException("Starting OpenVPN Thread", e);
Log.e(TAG, "OpenVPNThread Got " + e.toString());
diff --git a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java index 06024e8a..5f45feb8 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java +++ b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java @@ -17,6 +17,7 @@ import android.os.Message; import android.os.Parcel; import android.os.Parcelable; import android.text.TextUtils; +import android.util.Log; import java.io.ByteArrayInputStream; import java.io.File; @@ -34,6 +35,7 @@ import java.util.Locale; import java.util.UnknownFormatConversionException; import java.util.Vector; +import de.blinkt.openvpn.BuildConfig; import de.blinkt.openvpn.R; public class VpnStatus { @@ -584,6 +586,9 @@ public class VpnStatus { mLogFileHandler.sendMessage(mLogFileHandler.obtainMessage(LogFileHandler.TRIM_LOG_FILE)); } + if (BuildConfig.DEBUG && !cachedLine) + Log.d("OpenVPN", logItem.getString(null)); + for (LogListener ll : logListener) { ll.newLog(logItem); |