mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
Add file logging
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
940f2e64a0
commit
0cc5763cc4
2 changed files with 3 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
|||
<PackageReference Include="Remora.Discord.Extensions" Version="5.3.2"/>
|
||||
<PackageReference Include="Remora.Discord.Hosting" Version="6.0.7"/>
|
||||
<PackageReference Include="Remora.Discord.Interactivity" Version="4.5.1"/>
|
||||
<PackageReference Include="Serilog.Extensions.Logging.File" Version="3.0.0"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="locale\Messages.resx">
|
||||
|
|
|
@ -95,6 +95,8 @@ public class Boyfriend {
|
|||
}
|
||||
).ConfigureLogging(
|
||||
c => c.AddConsole()
|
||||
.AddFile("Logs/Boyfriend-{Date}.log",
|
||||
outputTemplate: "{Timestamp:o} [{Level:u4}] {Message} {NewLine}{Exception}")
|
||||
.AddFilter("System.Net.Http.HttpClient.*.LogicalHandler", LogLevel.Warning)
|
||||
.AddFilter("System.Net.Http.HttpClient.*.ClientHandler", LogLevel.Warning)
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue