Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce log spam #9417

Merged
merged 1 commit into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,8 @@ public class ScheduledTaskWorker : IScheduledTaskWorker
public ScheduledTaskWorker(IScheduledTask scheduledTask, IApplicationPaths applicationPaths, ITaskManager taskManager, ILogger logger)
{
ArgumentNullException.ThrowIfNull(scheduledTask);

ArgumentNullException.ThrowIfNull(applicationPaths);

ArgumentNullException.ThrowIfNull(taskManager);

ArgumentNullException.ThrowIfNull(logger);

ScheduledTask = scheduledTask;
Expand Down Expand Up @@ -332,7 +329,7 @@ private async void OnTriggerTriggered(object sender, EventArgs e)
return;
}

_logger.LogInformation("{0} fired for task: {1}", trigger.GetType().Name, Name);
_logger.LogDebug("{0} fired for task: {1}", trigger.GetType().Name, Name);

trigger.Stop();

Expand Down Expand Up @@ -378,7 +375,7 @@ private async Task ExecuteInternal(TaskOptions options)

CurrentCancellationTokenSource = new CancellationTokenSource();

_logger.LogInformation("Executing {0}", Name);
_logger.LogDebug("Executing {0}", Name);

((TaskManager)_taskManager).OnTaskExecuting(this);

Expand Down Expand Up @@ -406,7 +403,7 @@ private async Task ExecuteInternal(TaskOptions options)
}
catch (Exception ex)
{
_logger.LogError(ex, "Error");
_logger.LogError(ex, "Error executing Scheduled Task");

failureException = ex;

Expand Down
7 changes: 2 additions & 5 deletions Emby.Server.Implementations/ScheduledTasks/TaskManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void Execute<T>()
{
var type = scheduledTask.ScheduledTask.GetType();

_logger.LogInformation("Queuing task {0}", type.Name);
_logger.LogDebug("Queuing task {0}", type.Name);

lock (_taskQueue)
{
Expand Down Expand Up @@ -172,7 +172,7 @@ private void QueueScheduledTask(IScheduledTaskWorker task, TaskOptions options)
{
var type = task.ScheduledTask.GetType();

_logger.LogInformation("Queuing task {0}", type.Name);
_logger.LogDebug("Queuing task {0}", type.Name);

lock (_taskQueue)
{
Expand Down Expand Up @@ -254,9 +254,6 @@ internal void OnTaskCompleted(IScheduledTaskWorker task, TaskResult result)
/// </summary>
private void ExecuteQueuedTasks()
{
_logger.LogInformation("ExecuteQueuedTasks");

// Execute queued tasks
lock (_taskQueue)
{
var list = new List<Tuple<Type, TaskOptions>>();
Expand Down
6 changes: 3 additions & 3 deletions Jellyfin.Networking/Manager/NetworkManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1019,8 +1019,8 @@ private void InitialiseLAN(NetworkConfiguration config)
_internalInterfaces = CreateCollection(_interfaceAddresses.Where(IsInLocalNetwork));
}

_logger.LogInformation("Defined LAN addresses : {0}", _lanSubnets.AsString());
_logger.LogInformation("Defined LAN exclusions : {0}", _excludedSubnets.AsString());
_logger.LogInformation("Defined LAN addresses: {0}", _lanSubnets.AsString());
_logger.LogInformation("Defined LAN exclusions: {0}", _excludedSubnets.AsString());
_logger.LogInformation("Using LAN addresses: {0}", _lanSubnets.Exclude(_excludedSubnets, true).AsNetworks().AsString());
}
}
Expand Down Expand Up @@ -1145,7 +1145,7 @@ private void InitialiseInterfaces()
}

_logger.LogDebug("Discovered {0} interfaces.", _interfaceAddresses.Count);
_logger.LogDebug("Interfaces addresses : {0}", _interfaceAddresses.AsString());
_logger.LogDebug("Interfaces addresses: {0}", _interfaceAddresses.AsString());
}
}

Expand Down