mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Logging with Serilog File Sink does not work #445
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @srameh on GitHub (Jan 17, 2020).
I am using Serilog for logging to a file. It works when I run the site on the web. But when I run it as Electron NET app it does not write any log. When I change the Sink from File to Console it spits the logs on the console screen.
Is anyone aware of this issue?
@robalexclark commented on GitHub (Feb 7, 2020):
I'm not aware of any issue but I am using serilog to log to file using the following setup code in Program.cs:
@srameh commented on GitHub (Feb 8, 2020):
I found out the issue. If the are stored inside the wwwroot then the app has the permission to write them. If they are anywhere outside of the wwwroot then it will not write the log nor it will give any errors.