Возможно ли это?
Код: Выделить всё
static private Serilog.Core.Logger CreateLogger(string logFileName)
{
var config = new LoggerConfiguration()
.ReadFrom.AppSettings()
.WriteTo.File(logFileName,
rollingInterval: RollingInterval.Day,
rollOnFileSizeLimit: true,
fileSizeLimitBytes: 10000000,
outputTemplate: "{Timestamp:HH:mm:ss} [{Level}] [{SourceContext}] {Message}{NewLine}{Exception}")
.CreateLogger();
Log.Logger = config;
return config;
}
Подробнее здесь: https://stackoverflow.com/questions/657 ... app-config
Мобильная версия