aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/ClientLog/ClientLogEvent.cs75
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs5
2 files changed, 80 insertions, 0 deletions
diff --git a/MediaBrowser.Model/ClientLog/ClientLogEvent.cs b/MediaBrowser.Model/ClientLog/ClientLogEvent.cs
new file mode 100644
index 000000000..21087b564
--- /dev/null
+++ b/MediaBrowser.Model/ClientLog/ClientLogEvent.cs
@@ -0,0 +1,75 @@
+using System;
+using Microsoft.Extensions.Logging;
+
+namespace MediaBrowser.Model.ClientLog
+{
+ /// <summary>
+ /// The client log event.
+ /// </summary>
+ public class ClientLogEvent
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ClientLogEvent"/> class.
+ /// </summary>
+ /// <param name="timestamp">The log timestamp.</param>
+ /// <param name="level">The log level.</param>
+ /// <param name="userId">The user id.</param>
+ /// <param name="clientName">The client name.</param>
+ /// <param name="clientVersion">The client version.</param>
+ /// <param name="deviceId">The device id.</param>
+ /// <param name="message">The message.</param>
+ public ClientLogEvent(
+ DateTime timestamp,
+ LogLevel level,
+ Guid? userId,
+ string clientName,
+ string clientVersion,
+ string deviceId,
+ string message)
+ {
+ Timestamp = timestamp;
+ UserId = userId;
+ ClientName = clientName;
+ ClientVersion = clientVersion;
+ DeviceId = deviceId;
+ Message = message;
+ Level = level;
+ }
+
+ /// <summary>
+ /// Gets the event timestamp.
+ /// </summary>
+ public DateTime Timestamp { get; }
+
+ /// <summary>
+ /// Gets the log level.
+ /// </summary>
+ public LogLevel Level { get; }
+
+ /// <summary>
+ /// Gets the user id.
+ /// </summary>
+ public Guid? UserId { get; }
+
+ /// <summary>
+ /// Gets the client name.
+ /// </summary>
+ public string ClientName { get; }
+
+ /// <summary>
+ /// Gets the client version.
+ /// </summary>
+ public string ClientVersion { get; }
+
+ ///
+ /// <summary>
+ /// Gets the device id.
+ /// </summary>
+ public string DeviceId { get; }
+
+ /// <summary>
+ /// Gets the log message.
+ /// </summary>
+ public string Message { get; }
+ }
+}
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index d1e999666..b79d18abd 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -459,5 +459,10 @@ namespace MediaBrowser.Model.Configuration
/// Gets or sets a value indicating whether older plugins should automatically be deleted from the plugin folder.
/// </summary>
public bool RemoveOldPlugins { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether clients should be allowed to upload logs.
+ /// </summary>
+ public bool AllowClientLogUpload { get; set; } = true;
}
}