From 5edd1cbed5dd31b03aff88f7ad415dcf60211d60 Mon Sep 17 00:00:00 2001
From: lukeIam <2lukeiam@gmail.com>
Date: Wed, 24 Jan 2018 18:31:51 +0100
Subject: [PATCH] Add some documentation for CLog
---
VocaluxeLib/Log/CLog.cs | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/VocaluxeLib/Log/CLog.cs b/VocaluxeLib/Log/CLog.cs
index 10764b37..74087883 100644
--- a/VocaluxeLib/Log/CLog.cs
+++ b/VocaluxeLib/Log/CLog.cs
@@ -41,6 +41,16 @@ namespace VocaluxeLib.Log
private const string _MainLogTemplate = "[{TimeStampFromStart}] [{Level}] {Message}{NewLine}{Properties}{NewLine}{Exception}";
private const string _SongLogTemplate = "{Message}{NewLine}Additional info:{Properties}{NewLine}{Exception}";
+
+ ///
+ /// Initialize the logging framework.
+ ///
+ /// The folder where to write the log files.
+ /// The name of the main log.
+ /// The name of the log for song problems.
+ /// The name of the file which is used as crash marker.
+ /// The current version tag as it is displayed in the main menu.
+ /// Delegate to the function wchih should be called if the reporter have to been shown.
public static void Init(string logFolder, string fileNameMainLog, string fileNameSongInfoLog, string fileNameCrashMarker, string currentVersion, ShowReporterDelegate showReporterFunc)
{
_LogFolder = logFolder;
@@ -105,6 +115,9 @@ namespace VocaluxeLib.Log
Information("Starting to log", Params( new { Version = _CurrentVersion, StartDate = DateTime.Now, Id = Guid.NewGuid() } ) );
}
+ ///
+ /// Close all log files and the close the logging framework.
+ ///
public static void Close()
{
if (!(_MainLog is CSilentLogger))
@@ -128,6 +141,13 @@ namespace VocaluxeLib.Log
}
+ ///
+ /// Show the report assistent.
+ ///
+ /// Last error message template.
+ /// Data to fill the last error message template.
+ /// True if the crash version of the message should be shown.
+ /// True if the assistent should show a continue butoon, exit button otherwise.
public static void ShowLogAssistent(string messageTemplate, object[] propertyValues, bool crash = false, bool showContinue = true)
{
// Flush the _MainLogStringWriter to get the latest entries to _MainLogStringBuilder