From ea355b4262fa0b817930d2bb751c05e6e0ee3022 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Sat, 20 Nov 2021 08:47:05 -0700 Subject: Remove ClientLog endpoints --- .../ClientEvent/ClientEventLogger.cs | 26 +--------------------- .../ClientEvent/IClientEventLogger.cs | 8 ------- 2 files changed, 1 insertion(+), 33 deletions(-) (limited to 'MediaBrowser.Controller/ClientEvent') diff --git a/MediaBrowser.Controller/ClientEvent/ClientEventLogger.cs b/MediaBrowser.Controller/ClientEvent/ClientEventLogger.cs index 82b5b4593..dea1c2f32 100644 --- a/MediaBrowser.Controller/ClientEvent/ClientEventLogger.cs +++ b/MediaBrowser.Controller/ClientEvent/ClientEventLogger.cs @@ -1,47 +1,23 @@ using System; using System.IO; using System.Threading.Tasks; -using MediaBrowser.Model.ClientLog; -using Microsoft.Extensions.Logging; namespace MediaBrowser.Controller.ClientEvent { /// public class ClientEventLogger : IClientEventLogger { - private const string LogString = "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level}] [{ClientName}:{ClientVersion}]: UserId: {UserId} DeviceId: {DeviceId}{NewLine}{Message}"; - private readonly ILogger _logger; private readonly IServerApplicationPaths _applicationPaths; /// /// Initializes a new instance of the class. /// - /// Instance of the interface. /// Instance of the interface. - public ClientEventLogger( - ILogger logger, - IServerApplicationPaths applicationPaths) + public ClientEventLogger(IServerApplicationPaths applicationPaths) { - _logger = logger; _applicationPaths = applicationPaths; } - /// - public void Log(ClientLogEvent clientLogEvent) - { - _logger.Log( - LogLevel.Critical, - LogString, - clientLogEvent.Timestamp, - clientLogEvent.Level.ToString(), - clientLogEvent.ClientName, - clientLogEvent.ClientVersion, - clientLogEvent.UserId ?? Guid.Empty, - clientLogEvent.DeviceId, - Environment.NewLine, - clientLogEvent.Message); - } - /// public async Task WriteDocumentAsync(string clientName, string clientVersion, Stream fileContents) { diff --git a/MediaBrowser.Controller/ClientEvent/IClientEventLogger.cs b/MediaBrowser.Controller/ClientEvent/IClientEventLogger.cs index 34968d493..ad8a1bd24 100644 --- a/MediaBrowser.Controller/ClientEvent/IClientEventLogger.cs +++ b/MediaBrowser.Controller/ClientEvent/IClientEventLogger.cs @@ -1,7 +1,5 @@ using System.IO; using System.Threading.Tasks; -using MediaBrowser.Controller.Net; -using MediaBrowser.Model.ClientLog; namespace MediaBrowser.Controller.ClientEvent { @@ -10,12 +8,6 @@ namespace MediaBrowser.Controller.ClientEvent /// public interface IClientEventLogger { - /// - /// Logs the event from the client. - /// - /// The client log event. - void Log(ClientLogEvent clientLogEvent); - /// /// Writes a file to the log directory. /// -- cgit v1.2.3