From 2fdfb2b7f3d28667de2a20f68eb3ec46aebfec12 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 18 Sep 2013 14:37:34 +0200 Subject: Refactor logging messages --- src/de/blinkt/openvpn/core/VPNLaunchHelper.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/de/blinkt/openvpn/core/VPNLaunchHelper.java') diff --git a/src/de/blinkt/openvpn/core/VPNLaunchHelper.java b/src/de/blinkt/openvpn/core/VPNLaunchHelper.java index f6e8e0e3..a8770a69 100644 --- a/src/de/blinkt/openvpn/core/VPNLaunchHelper.java +++ b/src/de/blinkt/openvpn/core/VPNLaunchHelper.java @@ -45,7 +45,7 @@ public class VPNLaunchHelper { fout.close(); if(!mvpnout.setExecutable(true)) { - VpnStatus.logMessage(0, "", "Failed to set minivpn executable"); + VpnStatus.logError("Failed to set minivpn executable"); return false; } @@ -53,8 +53,8 @@ public class VPNLaunchHelper { return true; } catch (IOException e) { if(e2!=null) - VpnStatus.logMessage(0, "", e2.getLocalizedMessage()); - VpnStatus.logMessage(0, "", e.getLocalizedMessage()); + VpnStatus.logError( e2.getLocalizedMessage()); + VpnStatus.logError(e.getLocalizedMessage()); e.printStackTrace(); return false; } @@ -63,10 +63,11 @@ public class VPNLaunchHelper { public static void startOpenVpn(VpnProfile startprofile, Context context) { if(!writeMiniVPN(context)) { - VpnStatus.logMessage(0, "", "Error writing minivpn binary"); + VpnStatus.logError("Error writing minivpn binary"); return; } - VpnStatus.logMessage(0, "", context.getString(R.string.building_configration)); + + VpnStatus.logInfo(R.string.building_configration); Intent startVPN = startprofile.prepareIntent(context); if(startVPN!=null) -- cgit v1.2.3