mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-12 16:13:58 -07:00
UI for automatic update.
This commit is contained in:
parent
571998e70e
commit
8779a37f7f
5 changed files with 77 additions and 5 deletions
|
@ -2,6 +2,8 @@
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NLog.Config;
|
||||
using NLog.Targets;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Update.Providers;
|
||||
|
||||
|
@ -26,10 +28,7 @@ namespace NzbDrone.Update
|
|||
{
|
||||
Console.WriteLine("Starting NzbDrone Update Client");
|
||||
|
||||
LogConfiguration.RegisterConsoleLogger(LogLevel.Trace);
|
||||
LogConfiguration.RegisterUdpLogger();
|
||||
LogConfiguration.RegisterExceptioneer();
|
||||
LogConfiguration.Reload();
|
||||
InitLoggers();
|
||||
|
||||
logger.Info("Initializing update application");
|
||||
|
||||
|
@ -48,6 +47,26 @@ namespace NzbDrone.Update
|
|||
}
|
||||
}
|
||||
|
||||
private static void InitLoggers()
|
||||
{
|
||||
LogConfiguration.RegisterConsoleLogger(LogLevel.Trace);
|
||||
LogConfiguration.RegisterUdpLogger();
|
||||
LogConfiguration.RegisterExceptioneer();
|
||||
|
||||
var fileTarget = new FileTarget();
|
||||
fileTarget.AutoFlush = true;
|
||||
fileTarget.ConcurrentWrites = false;
|
||||
fileTarget.DeleteOldFileOnStartup = true;
|
||||
fileTarget.FileName = "upgrade.log";
|
||||
fileTarget.KeepFileOpen =false;
|
||||
|
||||
fileTarget.Layout = "${logger}: ${message} ${exception}";
|
||||
LogManager.Configuration.AddTarget(fileTarget.GetType().Name, fileTarget);
|
||||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, fileTarget));
|
||||
|
||||
LogConfiguration.Reload();
|
||||
}
|
||||
|
||||
public void Start(string[] args)
|
||||
{
|
||||
VerfityArguments(args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue