diff --git a/ICD.Common.Utils/Services/Logging/LogItem.cs b/ICD.Common.Utils/Services/Logging/LogItem.cs
index 0d217a1..c4f9784 100644
--- a/ICD.Common.Utils/Services/Logging/LogItem.cs
+++ b/ICD.Common.Utils/Services/Logging/LogItem.cs
@@ -1,5 +1,6 @@
using System;
-using ICD.Common.Properties;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
namespace ICD.Common.Utils.Services.Logging
{
@@ -17,12 +18,12 @@ namespace ICD.Common.Utils.Services.Logging
///
/// Gets the log time in UTC.
///
- [PublicAPI]
public DateTime Timestamp { get { return m_Timestamp; } }
///
/// Get/Set for severity level.
///
+ [JsonConverter(typeof(StringEnumConverter))]
public eSeverity Severity { get { return m_Severity; } }
///
@@ -40,10 +41,22 @@ namespace ICD.Common.Utils.Services.Logging
/// Severity Level, between 0 and 7
/// Error message text
public LogItem(eSeverity severity, string message)
+ : this(IcdEnvironment.GetUtcTime(), severity, message)
+ {
+ }
+
+ ///
+ /// Creates a new LogItem object with the specified values.
+ ///
+ ///
+ /// Severity Level, between 0 and 7
+ /// Error message text
+ [JsonConstructor]
+ public LogItem(DateTime timestamp, eSeverity severity, string message)
{
m_Severity = severity;
m_Message = message;
- m_Timestamp = IcdEnvironment.GetUtcTime();
+ m_Timestamp = timestamp;
}
#endregion
@@ -72,6 +85,11 @@ namespace ICD.Common.Utils.Services.Logging
return !a1.Equals(a2);
}
+ ///
+ /// Returns true if this instance is equal to the given object.
+ ///
+ ///
+ ///
public bool Equals(LogItem other)
{
return m_Severity == other.m_Severity &&