Browse Source

fixed compile errors in Release mode

tags/3.0
kimw 8 years ago
parent
commit
04486094f7
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      shadowsocks-csharp/Controller/Logging.cs

+ 4
- 2
shadowsocks-csharp/Controller/Logging.cs View File

@@ -48,9 +48,9 @@ namespace Shadowsocks.Controller
#endif #endif
} }
#if DEBUG
public static void Debug(EndPoint local, EndPoint remote, int len, string header = null, string tailer = null) public static void Debug(EndPoint local, EndPoint remote, int len, string header = null, string tailer = null)
{ {
#if DEBUG
if (header == null && tailer == null) if (header == null && tailer == null)
Debug($"{local} => {remote} (size={len})"); Debug($"{local} => {remote} (size={len})");
else if (header == null && tailer != null) else if (header == null && tailer != null)
@@ -59,13 +59,15 @@ namespace Shadowsocks.Controller
Debug($"{header}: {local} => {remote} (size={len})"); Debug($"{header}: {local} => {remote} (size={len})");
else else
Debug($"{header}: {local} => {remote} (size={len}), {tailer}"); Debug($"{header}: {local} => {remote} (size={len}), {tailer}");
#endif
} }
public static void Debug(Socket sock, int len, string header = null, string tailer = null) public static void Debug(Socket sock, int len, string header = null, string tailer = null)
{ {
#if DEBUG
Debug(sock.LocalEndPoint, sock.RemoteEndPoint, len, header, tailer); Debug(sock.LocalEndPoint, sock.RemoteEndPoint, len, header, tailer);
}
#endif #endif
}
public static void LogUsefulException(Exception e) public static void LogUsefulException(Exception e)
{ {


Loading…
Cancel
Save