From 59d82987c594cf6cbf9e1fb9cd0be222fec81b16 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sat, 28 Dec 2013 13:56:27 +0100 Subject: tune log message --HG-- extra : rebase_source : 76c78de6dbb9dfe27d247c6f45c1f4e9f4199bbd --- src/de/blinkt/openvpn/core/OpenVpnManagementThread.java | 5 ++--- src/de/blinkt/openvpn/core/VpnStatus.java | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/src/de/blinkt/openvpn/core/OpenVpnManagementThread.java index 59c9dfa2..caec4bd7 100644 --- a/src/de/blinkt/openvpn/core/OpenVpnManagementThread.java +++ b/src/de/blinkt/openvpn/core/OpenVpnManagementThread.java @@ -179,7 +179,7 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { } Log.d("Openvpn", "Failed to retrieve fd from socket: " + fd); - VpnStatus.logException("Failed to retrieve fd from socket", exp); + VpnStatus.logException("Failed to retrieve fd from socket (" + fd + ")" , exp); } private String processInput(String pendingInput) { @@ -199,7 +199,7 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { private void processCommand(String command) { - Log.i(TAG, "Line from managment" + command); + //Log.i(TAG, "Line from managment" + command); if (command.startsWith(">") && command.contains(":")) { @@ -429,7 +429,6 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { FileDescriptor[] fds = {fdtosend}; mSocket.setFileDescriptorsForSend(fds); - Log.d("Openvpn", "Sending FD tosocket: " + fdtosend + " " + fdint + " " + pfd); // Trigger a send so we can close the fd on our side of the channel // The API documentation fails to mention that it will not reset the file descriptor to // be send and will happily send the file descriptor on every write ... diff --git a/src/de/blinkt/openvpn/core/VpnStatus.java b/src/de/blinkt/openvpn/core/VpnStatus.java index f1445f77..20b56172 100644 --- a/src/de/blinkt/openvpn/core/VpnStatus.java +++ b/src/de/blinkt/openvpn/core/VpnStatus.java @@ -81,7 +81,8 @@ public class VpnStatus { INFO(2), ERROR(-2), WARNING(1), - VERBOSE(3); + VERBOSE(3), + DEBUG(4); protected int mValue; LogLevel(int value) { @@ -97,6 +98,7 @@ public class VpnStatus { case 1: return INFO; case 2: return ERROR; case 3: return WARNING; + case 4: return DEBUG; default: return null; } } @@ -450,6 +452,7 @@ public class VpnStatus { for (StateListener sl : stateListener) { sl.updateState(state,msg,resid,level); } + newLogItem(new LogItem((LogLevel.DEBUG), String.format("New OpenVPN Status (%s->%s): %s",state,level.toString(),msg))); } public static void logInfo(String message) { -- cgit v1.2.3