summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Logger.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/Logger.cs')
-rw-r--r--src/StardewModdingAPI/Logger.cs35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/StardewModdingAPI/Logger.cs b/src/StardewModdingAPI/Logger.cs
index 0f40cd25..f0f08e4f 100644
--- a/src/StardewModdingAPI/Logger.cs
+++ b/src/StardewModdingAPI/Logger.cs
@@ -2,24 +2,39 @@
namespace StardewModdingAPI
{
- /// <summary>
- /// A struct to store the message and the Date and Time the log entry was created
- /// </summary>
+ /// <summary>A message queued for log output.</summary>
public struct LogInfo
{
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The message to log.</summary>
public string Message { get; set; }
- public string LogTime { get; set; }
+
+ /// <summary>The log date.</summary>
public string LogDate { get; set; }
+
+ /// <summary>The log time.</summary>
+ public string LogTime { get; set; }
+
+ /// <summary>The message color.</summary>
public ConsoleColor Colour { get; set; }
- public LogInfo(string message, ConsoleColor colour = ConsoleColor.Gray)
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="message">The message to log.</param>
+ /// <param name="color">The message color.</param>
+ public LogInfo(string message, ConsoleColor color = ConsoleColor.Gray)
{
if (string.IsNullOrEmpty(message))
message = "[null]";
- Message = message;
- LogDate = DateTime.Now.ToString("yyyy-MM-dd");
- LogTime = DateTime.Now.ToString("hh:mm:ss.fff tt");
- Colour = colour;
+ this.Message = message;
+ this.LogDate = DateTime.Now.ToString("yyyy-MM-dd");
+ this.LogTime = DateTime.Now.ToString("hh:mm:ss.fff tt");
+ this.Colour = color;
}
}
-} \ No newline at end of file
+}