|
|
@ -62,20 +62,14 @@ namespace NzbDrone.Update
|
|
|
|
|
|
|
|
|
|
|
|
private static void InitLoggers()
|
|
|
|
private static void InitLoggers()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
LogConfiguration.RegisterExceptioneer();
|
|
|
|
|
|
|
|
|
|
|
|
LogConfiguration.RegisterConsoleLogger(LogLevel.Trace);
|
|
|
|
LogConfiguration.RegisterConsoleLogger(LogLevel.Trace);
|
|
|
|
LogConfiguration.RegisterUdpLogger();
|
|
|
|
LogConfiguration.RegisterUdpLogger();
|
|
|
|
|
|
|
|
|
|
|
|
var lastUpgradeLog = new FileTarget();
|
|
|
|
var logPath = Path.Combine(new EnviromentProvider().GetSandboxLogFolder(), DateTime.Now.ToString("yyyy.MM.dd-H-mm") + ".txt");
|
|
|
|
lastUpgradeLog.AutoFlush = true;
|
|
|
|
LogConfiguration.RegisterFileLogger(logPath);
|
|
|
|
lastUpgradeLog.ConcurrentWrites = false;
|
|
|
|
|
|
|
|
lastUpgradeLog.FileName = Path.Combine(new EnviromentProvider().GetSandboxLogFolder(), DateTime.Now.ToString("yyyy.MM.dd-H-mm") + ".txt");
|
|
|
|
|
|
|
|
lastUpgradeLog.KeepFileOpen = false;
|
|
|
|
|
|
|
|
lastUpgradeLog.Layout = "${longdate} - ${logger}: ${message} ${exception:format=ToString}";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LogManager.Configuration.AddTarget(lastUpgradeLog.GetType().Name, lastUpgradeLog);
|
|
|
|
|
|
|
|
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, lastUpgradeLog));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LogConfiguration.RegisterExceptioneer();
|
|
|
|
|
|
|
|
LogConfiguration.Reload();
|
|
|
|
LogConfiguration.Reload();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|