diff --git a/marketplace/Empostor.Plugin.Log.dll b/marketplace/Empostor.Plugin.Log.dll deleted file mode 100644 index 40a5f5e..0000000 Binary files a/marketplace/Empostor.Plugin.Log.dll and /dev/null differ diff --git a/marketplace/Serilog.Sinks.File.dll b/marketplace/Serilog.Sinks.File.dll deleted file mode 100644 index 17d80f3..0000000 Binary files a/marketplace/Serilog.Sinks.File.dll and /dev/null differ diff --git a/marketplace/plugins.json b/marketplace/plugins.json index d113509..3a72176 100644 --- a/marketplace/plugins.json +++ b/marketplace/plugins.json @@ -1,17 +1,4 @@ [ - { - "id": "cn.hayashiume.log", - "name": "Log to File", - "description": "Writes server logs to rolling files. Requires Serilog.Sinks.File.dll alongside this plugin.", - "author": "Serilog & HayashiUme", - "versions": [ - { - "version": "1.0.0", - "empostor_version": "2.0.0", - "download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Empostor.Plugin.Log.dll" - } - ] - }, { "id": "cn.hayashiume.chat", "name": "Chat Manager", diff --git a/src/Empostor.Server/Program.cs b/src/Empostor.Server/Program.cs index 5c1141b..fd25d33 100644 --- a/src/Empostor.Server/Program.cs +++ b/src/Empostor.Server/Program.cs @@ -209,6 +209,11 @@ namespace Empostor.Server .MinimumLevel.Override("Microsoft.AspNetCore", LogEventLevel.Warning) .Enrich.FromLogContext() .WriteTo.Console() + .WriteTo.File( + "Log/empostor-.log", + rollingInterval: RollingInterval.Day, + retainedFileCountLimit: 31, + outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}") .ReadFrom.Configuration(context.Configuration, new ConfigurationReaderOptions(ConfigurationAssemblySource.AlwaysScanDllFiles)); AssemblyLoadContext.Default.Resolving -= TryLoad; diff --git a/src/Empostor.sln b/src/Empostor.sln index 8edf6c4..afca3b1 100644 --- a/src/Empostor.sln +++ b/src/Empostor.sln @@ -31,8 +31,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Empostor.Plugins.QqVerify", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Empostor.Plugins.PlayerChannel", "Empostor.Plugins.PlayerChannel\Empostor.Plugins.PlayerChannel.csproj", "{D4B6C8A2-5F3E-4C1D-9B7A-6E2F8A4C1D3F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Empostor.Plugin.Log", "Empostor.Plugin.Log\Empostor.Plugin.Log.csproj", "{4A60E512-B425-4331-8E4E-E7CAC2B2EF36}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Empostor.Plugin.Chat", "Empostor.Plugin.Chat\Empostor.Plugin.Chat.csproj", "{9D1FD146-E7D9-4AFF-9B8E-25E6021A69D7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Empostor.Plugin.Code", "Empostor.Plugin.Code\Empostor.Plugin.Code.csproj", "{ADC4F301-51C0-45DB-B97A-BE3844DFD19B}" @@ -191,18 +189,6 @@ Global {D4B6C8A2-5F3E-4C1D-9B7A-6E2F8A4C1D3F}.Release|x64.Build.0 = Release|Any CPU {D4B6C8A2-5F3E-4C1D-9B7A-6E2F8A4C1D3F}.Release|x86.ActiveCfg = Release|Any CPU {D4B6C8A2-5F3E-4C1D-9B7A-6E2F8A4C1D3F}.Release|x86.Build.0 = Release|Any CPU - {4A60E512-B425-4331-8E4E-E7CAC2B2EF36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A60E512-B425-4331-8E4E-E7CAC2B2EF36}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A60E512-B425-4331-8E4E-E7CAC2B2EF36}.Debug|x64.ActiveCfg = Debug|Any CPU - {4A60E512-B425-4331-8E4E-E7CAC2B2EF36}.Debug|x64.Build.0 = Debug|Any CPU - {4A60E512-B425-4331-8E4E-E7CAC2B2EF36}.Debug|x86.ActiveCfg = Debug|Any CPU - {4A60E512-B425-4331-8E4E-E7CAC2B2EF36}.Debug|x86.Build.0 = Debug|Any CPU - {4A60E512-B425-4331-8E4E-E7CAC2B2EF36}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A60E512-B425-4331-8E4E-E7CAC2B2EF36}.Release|Any CPU.Build.0 = Release|Any CPU - {4A60E512-B425-4331-8E4E-E7CAC2B2EF36}.Release|x64.ActiveCfg = Release|Any CPU - {4A60E512-B425-4331-8E4E-E7CAC2B2EF36}.Release|x64.Build.0 = Release|Any CPU - {4A60E512-B425-4331-8E4E-E7CAC2B2EF36}.Release|x86.ActiveCfg = Release|Any CPU - {4A60E512-B425-4331-8E4E-E7CAC2B2EF36}.Release|x86.Build.0 = Release|Any CPU {9D1FD146-E7D9-4AFF-9B8E-25E6021A69D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9D1FD146-E7D9-4AFF-9B8E-25E6021A69D7}.Debug|Any CPU.Build.0 = Debug|Any CPU {9D1FD146-E7D9-4AFF-9B8E-25E6021A69D7}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -241,7 +227,6 @@ Global {3038597E-E1A1-2958-1CF7-C4203A85F424} = {E0009DCB-32A6-45C4-A06C-7F62D4091A29} {B8A5D7C3-1F4E-4A2B-9C6D-8E3F5A7B1D2E} = {E0009DCB-32A6-45C4-A06C-7F62D4091A29} {D4B6C8A2-5F3E-4C1D-9B7A-6E2F8A4C1D3F} = {E0009DCB-32A6-45C4-A06C-7F62D4091A29} - {4A60E512-B425-4331-8E4E-E7CAC2B2EF36} = {E0009DCB-32A6-45C4-A06C-7F62D4091A29} {9D1FD146-E7D9-4AFF-9B8E-25E6021A69D7} = {E0009DCB-32A6-45C4-A06C-7F62D4091A29} {ADC4F301-51C0-45DB-B97A-BE3844DFD19B} = {E0009DCB-32A6-45C4-A06C-7F62D4091A29} EndGlobalSection