Modernize NuGet dependencies and migrate to PackageReference (#823)
* Add .vscode to .gitignore * Update copyright year * Update Newtonsoft.Json package to version 13.0.4 * Migrate NuGet to PackageReference * Replace vocaluxe.dependencies.sqlite with Microsoft.Data.Sqlite * Update Serilog package references to latest versions * Fix typo
This commit is contained in:
1 parent
f11e27d98b
commit
9fbcc077ff
16 files changed
+417
-460
No files matched your search
+167
-167
@@ -44,11 +44,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Verbose(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Verbose(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_MainLog.Verbose(messageTemplate);
|
||||
}
|
||||
@@ -64,11 +64,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Verbose(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Verbose(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -96,18 +96,18 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Verbose(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Verbose(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_MainLog.Verbose( exception, messageTemplate);
|
||||
}
|
||||
if(show)
|
||||
ShowLogAssistant(messageTemplate, null);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Verbose level with additional propertyValues and associated exception to the Verbose log.
|
||||
/// </summary>
|
||||
@@ -117,11 +117,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Verbose(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Verbose(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -152,11 +152,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Debug(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Debug(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_MainLog.Debug(messageTemplate);
|
||||
}
|
||||
@@ -172,11 +172,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Debug(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Debug(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -204,18 +204,18 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Debug(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Debug(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_MainLog.Debug( exception, messageTemplate);
|
||||
}
|
||||
if(show)
|
||||
ShowLogAssistant(messageTemplate, null);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Debug level with additional propertyValues and associated exception to the Debug log.
|
||||
/// </summary>
|
||||
@@ -225,11 +225,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Debug(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Debug(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -260,11 +260,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Information(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Information(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_MainLog.Information(messageTemplate);
|
||||
}
|
||||
@@ -280,11 +280,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Information(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Information(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -312,18 +312,18 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Information(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Information(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_MainLog.Information( exception, messageTemplate);
|
||||
}
|
||||
if(show)
|
||||
ShowLogAssistant(messageTemplate, null);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Information level with additional propertyValues and associated exception to the Information log.
|
||||
/// </summary>
|
||||
@@ -333,11 +333,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Information(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Information(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -368,11 +368,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Warning(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Warning(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_MainLog.Warning(messageTemplate);
|
||||
}
|
||||
@@ -388,11 +388,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Warning(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Warning(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -420,18 +420,18 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Warning(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Warning(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_MainLog.Warning( exception, messageTemplate);
|
||||
}
|
||||
if(show)
|
||||
ShowLogAssistant(messageTemplate, null);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Warning level with additional propertyValues and associated exception to the Warning log.
|
||||
/// </summary>
|
||||
@@ -441,11 +441,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Warning(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Warning(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -476,11 +476,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Error(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Error(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_MainLog.Error(messageTemplate);
|
||||
}
|
||||
@@ -496,11 +496,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Error(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Error(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -528,18 +528,18 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Error(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Error(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_MainLog.Error( exception, messageTemplate);
|
||||
}
|
||||
if(show)
|
||||
ShowLogAssistant(messageTemplate, null);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Error level with additional propertyValues and associated exception to the Error log.
|
||||
/// </summary>
|
||||
@@ -549,11 +549,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Error(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Error(Exception exception, string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -584,11 +584,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Fatal(string messageTemplate, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Fatal(string messageTemplate, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_MainLog.Fatal(messageTemplate);
|
||||
}
|
||||
@@ -608,11 +608,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Fatal(string messageTemplate, object[] propertyValues, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Fatal(string messageTemplate, object[] propertyValues, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -644,11 +644,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Fatal(Exception exception, string messageTemplate, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Fatal(Exception exception, string messageTemplate, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_MainLog.Fatal( exception, messageTemplate);
|
||||
}
|
||||
@@ -659,7 +659,7 @@ namespace VocaluxeLib.Log
|
||||
Close();
|
||||
Environment.Exit(Environment.ExitCode);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Fatal level with additional propertyValues and associated exception to the Fatal log and TERMINATES the appication.
|
||||
/// </summary>
|
||||
@@ -669,11 +669,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="show">True if an message should be shown to the user, false otherwise.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Fatal(Exception exception, string messageTemplate, object[] propertyValues, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Fatal(Exception exception, string messageTemplate, object[] propertyValues, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -702,25 +702,25 @@ namespace VocaluxeLib.Log
|
||||
[SuppressMessage("ReSharper", "MemberHidesStaticFromOuterClass")]
|
||||
public static class CSongLog
|
||||
{
|
||||
|
||||
|
||||
#region Verbose functions
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Verbose level to the Verbose log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">Message template for this event.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Verbose(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Verbose(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_SongLog.Verbose(messageTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Verbose level with additional propertyValues to the Verbose log.
|
||||
/// </summary>
|
||||
@@ -728,11 +728,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Verbose(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Verbose(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -749,7 +749,7 @@ namespace VocaluxeLib.Log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Verbose level and associated exception to the Verbose log.
|
||||
/// </summary>
|
||||
@@ -757,16 +757,16 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="messageTemplate">Message template for this event.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Verbose(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Verbose(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_SongLog.Verbose( exception, messageTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Verbose level with additional propertyValues and associated exception to the Verbose log.
|
||||
/// </summary>
|
||||
@@ -775,11 +775,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Verbose(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Verbose(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -796,27 +796,27 @@ namespace VocaluxeLib.Log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Debug functions
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Debug level to the Debug log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">Message template for this event.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Debug(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Debug(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_SongLog.Debug(messageTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Debug level with additional propertyValues to the Debug log.
|
||||
/// </summary>
|
||||
@@ -824,11 +824,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Debug(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Debug(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -845,7 +845,7 @@ namespace VocaluxeLib.Log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Debug level and associated exception to the Debug log.
|
||||
/// </summary>
|
||||
@@ -853,16 +853,16 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="messageTemplate">Message template for this event.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Debug(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Debug(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_SongLog.Debug( exception, messageTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Debug level with additional propertyValues and associated exception to the Debug log.
|
||||
/// </summary>
|
||||
@@ -871,11 +871,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Debug(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Debug(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -892,27 +892,27 @@ namespace VocaluxeLib.Log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Information functions
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Information level to the Information log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">Message template for this event.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Information(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Information(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_SongLog.Information(messageTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Information level with additional propertyValues to the Information log.
|
||||
/// </summary>
|
||||
@@ -920,11 +920,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Information(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Information(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -941,7 +941,7 @@ namespace VocaluxeLib.Log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Information level and associated exception to the Information log.
|
||||
/// </summary>
|
||||
@@ -949,16 +949,16 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="messageTemplate">Message template for this event.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Information(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Information(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_SongLog.Information( exception, messageTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Information level with additional propertyValues and associated exception to the Information log.
|
||||
/// </summary>
|
||||
@@ -967,11 +967,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Information(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Information(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -988,27 +988,27 @@ namespace VocaluxeLib.Log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Warning functions
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Warning level to the Warning log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">Message template for this event.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Warning(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Warning(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_SongLog.Warning(messageTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Warning level with additional propertyValues to the Warning log.
|
||||
/// </summary>
|
||||
@@ -1016,11 +1016,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Warning(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Warning(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -1037,7 +1037,7 @@ namespace VocaluxeLib.Log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Warning level and associated exception to the Warning log.
|
||||
/// </summary>
|
||||
@@ -1045,16 +1045,16 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="messageTemplate">Message template for this event.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Warning(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Warning(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_SongLog.Warning( exception, messageTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Warning level with additional propertyValues and associated exception to the Warning log.
|
||||
/// </summary>
|
||||
@@ -1063,11 +1063,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Warning(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Warning(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -1084,27 +1084,27 @@ namespace VocaluxeLib.Log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Error functions
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Error level to the Error log.
|
||||
/// </summary>
|
||||
/// <param name="messageTemplate">Message template for this event.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Error(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Error(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_SongLog.Error(messageTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Error level with additional propertyValues to the Error log.
|
||||
/// </summary>
|
||||
@@ -1112,11 +1112,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Error(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Error(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
@@ -1133,7 +1133,7 @@ namespace VocaluxeLib.Log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Error level and associated exception to the Error log.
|
||||
/// </summary>
|
||||
@@ -1141,16 +1141,16 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="messageTemplate">Message template for this event.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Error(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Error(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
_SongLog.Error( exception, messageTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Write an event with the Error level with additional propertyValues and associated exception to the Error log.
|
||||
/// </summary>
|
||||
@@ -1159,11 +1159,11 @@ namespace VocaluxeLib.Log
|
||||
/// <param name="propertyValues">Data inserted into the message template.</param>
|
||||
/// <param name="callerMethodeName">Don't use! The methode name of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerFilePath">Don't use! The filepath of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumer">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
/// <param name="callerLineNumber">Don't use! The line number of the caller will be filled automatically by the compiler.</param>
|
||||
[MessageTemplateFormatMethod("messageTemplate")]
|
||||
public static void Error(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1)
|
||||
public static void Error(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
|
||||
{
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer}))
|
||||
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
|
||||
{
|
||||
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
|
||||
|
||||
|
||||
Reference in new issue
Block a user