Migrate to Serilog

This commit is contained in:
ChsBuffer
2021-05-29 19:54:44 +08:00
parent f6dfb25e3f
commit 7493f07da9
34 changed files with 162 additions and 228 deletions

View File

@@ -1,5 +1,6 @@
using System.Runtime.InteropServices;
using System.Text;
using Serilog;
namespace Netch.Interops
{
@@ -35,13 +36,13 @@ namespace Netch.Interops
public static bool Dial(NameList name, string value)
{
Global.Logger.Debug($"[tun2socks] Dial {name}: {value}");
Log.Debug( $"[tun2socks] Dial {name}: {value}");
return tun_dial(name, Encoding.UTF8.GetBytes(value));
}
public static bool Init()
{
Global.Logger.Debug($"[tun2socks] init");
Log.Debug("[tun2socks] init");
return tun_init();
}