mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 17:44:43 +01:00
Use Microsoft.Extensions.Logging abstraction
This commit is contained in:
@@ -8,6 +8,9 @@ using System.Net.WebSockets;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MediaBrowser.Model.Net;
|
||||
using MediaBrowser.Model.Threading;
|
||||
|
||||
namespace MediaBrowser.Controller.Net
|
||||
{
|
||||
@@ -114,7 +117,7 @@ namespace MediaBrowser.Controller.Net
|
||||
|
||||
var cancellationTokenSource = new CancellationTokenSource();
|
||||
|
||||
Logger.Debug("{1} Begin transmitting over websocket to {0}", message.Connection.RemoteEndPoint, GetType().Name);
|
||||
Logger.LogDebug("{1} Begin transmitting over websocket to {0}", message.Connection.RemoteEndPoint, GetType().Name);
|
||||
|
||||
var timer = SendOnTimer ?
|
||||
TimerFactory.Create(TimerCallback, message.Connection, Timeout.Infinite, Timeout.Infinite) :
|
||||
@@ -229,7 +232,7 @@ namespace MediaBrowser.Controller.Net
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.ErrorException("Error sending web socket message {0}", ex, Name);
|
||||
Logger.LogError("Error sending web socket message {0}", ex, Name);
|
||||
DisposeConnection(tuple);
|
||||
}
|
||||
}
|
||||
@@ -257,7 +260,7 @@ namespace MediaBrowser.Controller.Net
|
||||
/// <param name="connection">The connection.</param>
|
||||
private void DisposeConnection(Tuple<IWebSocketConnection, CancellationTokenSource, ITimer, TStateType> connection)
|
||||
{
|
||||
Logger.Debug("{1} stop transmitting over websocket to {0}", connection.Item1.RemoteEndPoint, GetType().Name);
|
||||
Logger.LogDebug("{1} stop transmitting over websocket to {0}", connection.Item1.RemoteEndPoint, GetType().Name);
|
||||
|
||||
var timer = connection.Item3;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user