protected override void Configure() { var logPath = LogSetup.GetLogsFolderPath("Logs"); LogSetup.Execute(); var directPath = Path.Combine(logPath, "ChocolateyGui.{Date}.log"); var logConfig = new LoggerConfiguration() .WriteTo.Async(config => config.RollingFile(directPath, retainedFileCountLimit: 10, fileSizeLimitBytes: 150 * 1000 * 1000)) .SetDefaultLevel(); Logger = Log.Logger = logConfig.CreateLogger(); Container = AutoFacConfiguration.RegisterAutoFac(LicensedChocolateyGuiAssemblySimpleName, LicensedGuiAssemblyLocation); }
internal static void Configure() { var logPath = LogSetup.GetLogsFolderPath("Logs"); LogSetup.Execute(); var directPath = Path.Combine(logPath, "ChocolateyGuiCli.{Date}.log"); var logConfig = new LoggerConfiguration() .WriteTo.Sink(new ColouredConsoleSink(), LogEventLevel.Information) .WriteTo.Async(config => config.RollingFile(directPath, retainedFileCountLimit: 10, fileSizeLimitBytes: 150 * 1000 * 1000)) .SetDefaultLevel(); Logger = Log.Logger = logConfig.CreateLogger(); Container = AutoFacConfiguration.RegisterAutoFac(); }