aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/ClientLog/ClientLogEvent.cs
blob: 21087b5647e4fc99f900f4be87a0f395411f2e22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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; }
    }
}