From da20e8dcd2867df0a9a6ebc1081edb2db2eebdef Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 29 Oct 2016 16:02:21 -0400 Subject: continue with .net core targeting --- .../ScheduledTasks/Tasks/ReloadLoggerFileTask.cs | 113 --------------------- 1 file changed, 113 deletions(-) delete mode 100644 MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/ReloadLoggerFileTask.cs (limited to 'MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/ReloadLoggerFileTask.cs') diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/ReloadLoggerFileTask.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/ReloadLoggerFileTask.cs deleted file mode 100644 index 3c33df832..000000000 --- a/MediaBrowser.Common.Implementations/ScheduledTasks/Tasks/ReloadLoggerFileTask.cs +++ /dev/null @@ -1,113 +0,0 @@ -using MediaBrowser.Common.Configuration; -using MediaBrowser.Common.ScheduledTasks; -using MediaBrowser.Model.Logging; -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using MediaBrowser.Model.Tasks; - -namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks -{ - /// - /// Class ReloadLoggerFileTask - /// - public class ReloadLoggerFileTask : IScheduledTask, IConfigurableScheduledTask - { - /// - /// Gets or sets the log manager. - /// - /// The log manager. - private ILogManager LogManager { get; set; } - /// - /// Gets or sets the configuration manager. - /// - /// The configuration manager. - private IConfigurationManager ConfigurationManager { get; set; } - - /// - /// Initializes a new instance of the class. - /// - /// The logManager. - /// The configuration manager. - public ReloadLoggerFileTask(ILogManager logManager, IConfigurationManager configurationManager) - { - LogManager = logManager; - ConfigurationManager = configurationManager; - } - - /// - /// Gets the default triggers. - /// - /// IEnumerable{BaseTaskTrigger}. - public IEnumerable GetDefaultTriggers() - { - var trigger = new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerDaily, TimeOfDayTicks = TimeSpan.FromHours(0).Ticks }; //12am - - return new[] { trigger }; - } - - /// - /// Executes the internal. - /// - /// The cancellation token. - /// The progress. - /// Task. - public Task Execute(CancellationToken cancellationToken, IProgress progress) - { - cancellationToken.ThrowIfCancellationRequested(); - - progress.Report(0); - - LogManager.ReloadLogger(ConfigurationManager.CommonConfiguration.EnableDebugLevelLogging - ? LogSeverity.Debug - : LogSeverity.Info); - - return Task.FromResult(true); - } - - /// - /// Gets the name. - /// - /// The name. - public string Name - { - get { return "Start new log file"; } - } - - public string Key { get; } - - /// - /// Gets the description. - /// - /// The description. - public string Description - { - get { return "Moves logging to a new file to help reduce log file sizes."; } - } - - /// - /// Gets the category. - /// - /// The category. - public string Category - { - get { return "Application"; } - } - - public bool IsHidden - { - get { return true; } - } - - public bool IsEnabled - { - get { return true; } - } - - public bool IsLogged - { - get { return true; } - } - } -} -- cgit v1.2.3