summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/Logging/Model/LogMessage.cs
blob: edf071ba1c4e6c12ee14e464c7ce672e4bfc5d66 (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
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="LogMessage.cs" company="HandBrake Project (http://handbrake.fr)">
//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
// <summary>
//   The message.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace HandBrake.ApplicationServices.Services.Logging.Model
{
    /// <summary>
    /// An Immutable Log Entry.
    /// </summary>
    public class LogMessage
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="LogMessage"/> class.
        /// </summary>
        /// <param name="content">
        /// The content.
        /// </param>
        /// <param name="messageType">
        /// The message type.
        /// </param>
        /// <param name="logLevel">
        /// The log level.
        /// </param>
        /// <param name="messageIndex">
        /// The message Index.
        /// </param>
        public LogMessage(string content, LogMessageType messageType, LogLevel logLevel, long messageIndex)
        {
            this.Content = content;
            this.MessageType = messageType;
            this.LogLevel = logLevel;
            this.MessageIndex = messageIndex;
        }

        /// <summary>
        /// Gets the content.
        /// </summary>
        public string Content { get; private set; }

        /// <summary>
        /// Gets a value indicating whether this message was generated by the GUI.
        /// If false, it was provided by libhb.
        /// </summary>
        public LogMessageType MessageType { get; private set; }

        /// <summary>
        /// Gets the log level.
        /// </summary>
        public LogLevel LogLevel { get; private set; }

        /// <summary>
        /// Gets the message index.
        /// </summary>
        public long MessageIndex { get; private set; }
    }
}