Apply R# clean-up for reliability (#877)

* Apply R# clean-up for reliability

- Migrate to NUnit4 Assert.That
- Update dependencise versions
- Fix LangVersion to 9.0 (until net core migration)
- Reformat code
- Apply 'var' style (easier for refactoring)
- Remove redundant parentheses
- Add braces on every condition blocks (1 line)
- Uses new null checking patterns
- Uses AutoProperties when possible
- Uses string scalar type instead of class
- Clean usings
- Add .orig files in git ignore
- Rename some properties to respect defined conventions and US format definition
	- ID -> Id
	- BPM -> Bpm
	- Finish -> End

* Update R# settings according to the clean-up made
This commit is contained in:
Quentin Bray authored and GitHub committed 2026-06-22 19:52:06 +02:00
1 parent b9b0f7c8df
commit 6ffa63b923
236 files changed
+14194 -7278

No files matched your search

+22 -11
View File
@@ -29,7 +29,7 @@ namespace VocaluxeLib.Log
{
// Pool of stop watches shared between all instances (we can get more than 5 but it only keeps 5)
private static readonly CObjectPool<Stopwatch> _WatchesPool = new CObjectPool<Stopwatch>(() => new Stopwatch(), 5);
private static readonly double _NanosecPerTick = (1000.0 * 1000.0 * 1000.0) / Stopwatch.Frequency;
private static readonly double _NanosecPerTick = 1000.0 * 1000.0 * 1000.0 / Stopwatch.Frequency;
// The stop watch used by this instance
private Stopwatch _Watch = null;
@@ -51,7 +51,10 @@ namespace VocaluxeLib.Log
public void Start()
{
if (_Watch != null)
{
throw new InvalidOperationException("Timer is already running.");
}
_Watch = _WatchesPool.GetObject();
_Watch.Restart();
CLog.Information("Started {StartedOperation}", CLog.Params(_OperationName));
@@ -64,16 +67,23 @@ namespace VocaluxeLib.Log
public void Stop(bool success = true)
{
if (_Watch == null)
{
return;
}
_Watch.Stop();
double duration = _GetElapsedTime(_Watch);
var duration = _GetElapsedTime(_Watch);
_WatchesPool.PutObject(_Watch);
_Watch = null;
if (success)
{
CLog.Information("Finished {StartedOperation} successfully in {Duration:#,##0.00}ms", CLog.Params(_OperationName, duration));
}
else
{
CLog.Information("Failed {StartedOperation} in {Duration:#,##0.00}ms", CLog.Params(_OperationName, duration));
}
}
/// <summary>
@@ -84,9 +94,13 @@ namespace VocaluxeLib.Log
private double _GetElapsedTime(Stopwatch watch)
{
if (Stopwatch.IsHighResolution && _NanosecPerTick > 0)
return (float)((_NanosecPerTick * watch.ElapsedTicks) / (1000.0 * 1000.0));
{
return (float)(_NanosecPerTick * watch.ElapsedTicks / (1000.0 * 1000.0));
}
else
{
return watch.ElapsedMilliseconds;
}
}
/// <summary>
@@ -95,11 +109,12 @@ namespace VocaluxeLib.Log
public void Dispose()
{
if (_Watch != null)
{
Stop();
}
}
#region Static functions
/// <summary>
/// Logs the time from now to disposal of the returned object.
/// </summary>
@@ -114,7 +129,7 @@ namespace VocaluxeLib.Log
/// </example>
public static IDisposable Time(string operationName)
{
CBenchmark benchmark = new CBenchmark(operationName);
var benchmark = new CBenchmark(operationName);
benchmark.Start();
return benchmark;
}
@@ -134,13 +149,12 @@ namespace VocaluxeLib.Log
/// </example>
public static COperation Begin(string operationName)
{
CBenchmark benchmark = new CBenchmark(operationName);
var benchmark = new CBenchmark(operationName);
benchmark.Start();
return new COperation(benchmark);
}
#region Helper class for operation
/// <summary>
/// Helper object to end a benchmark (End() for success and Dispose() for failure).
/// </summary>
@@ -155,7 +169,6 @@ namespace VocaluxeLib.Log
internal COperation(CBenchmark benchmark)
{
_Benchmark = benchmark;
}
/// <summary>
@@ -174,9 +187,7 @@ namespace VocaluxeLib.Log
_Benchmark.Stop(false);
}
}
#endregion
#endregion
}
}
}
+22 -17
View File
@@ -51,7 +51,8 @@ namespace VocaluxeLib.Log
/// <param name="currentVersion">The current version tag as it is displayed in the main menu.</param>
/// <param name="showReporterFunc">Delegate to the function which should be called if the reporter have to been shown.</param>
/// <param name="logLevel">The log level for log messages.</param>
public static void Init(string logFolder, string fileNameMainLog, string fileNameSongInfoLog, string fileNameCrashMarker, string currentVersion, ShowReporterDelegate showReporterFunc, ELogLevel logLevel)
public static void Init(string logFolder, string fileNameMainLog, string fileNameSongInfoLog, string fileNameCrashMarker, string currentVersion,
ShowReporterDelegate showReporterFunc, ELogLevel logLevel)
{
_LogFolder = logFolder;
_ShowReporterFunc = showReporterFunc;
@@ -61,7 +62,9 @@ namespace VocaluxeLib.Log
// Creates the log directory if it does not exist
if (!Directory.Exists(_LogFolder))
{
Directory.CreateDirectory(_LogFolder);
}
var mainLogFilePath = Path.Combine(_LogFolder, fileNameMainLog);
var songLogFilePath = Path.Combine(_LogFolder, fileNameSongInfoLog);
@@ -71,7 +74,7 @@ namespace VocaluxeLib.Log
{
// There was a crash in the last run -> check version tag of the crashed application instance
string versionTag;
using (StreamReader reader = new StreamReader(_CrashMarkerFilePath, Encoding.UTF8))
using (var reader = new StreamReader(_CrashMarkerFilePath, Encoding.UTF8))
{
versionTag = (reader.ReadLine() ?? "").Trim();
}
@@ -91,7 +94,7 @@ namespace VocaluxeLib.Log
}
#endif
}
// Write new marker
File.WriteAllText(_CrashMarkerFilePath, _CurrentVersion, Encoding.UTF8);
@@ -116,7 +119,7 @@ namespace VocaluxeLib.Log
_SongLog = new LoggerConfiguration()
.MinimumLevel.Is(logLevel.ToSerilogLogLevel())
.WriteTo.File(songLogFilePath,
.WriteTo.File(songLogFilePath,
flushToDiskInterval: TimeSpan.FromSeconds(60),
outputTemplate: _SongLogTemplate)
#if DEBUG
@@ -125,10 +128,10 @@ namespace VocaluxeLib.Log
.CreateLogger();
// Adding first line to log with information about this run
Information("Starting to log",
Params( new { Version = _CurrentVersion},
new { StartDate = DateTime.Now},
new { Id = Guid.NewGuid() } ) );
Information("Starting to log",
Params(new { Version = _CurrentVersion },
new { StartDate = DateTime.Now },
new { Id = Guid.NewGuid() }));
}
/// <summary>
@@ -138,7 +141,7 @@ namespace VocaluxeLib.Log
{
if (!(_MainLog is CSilentLogger))
{
ILogger loggerToDispose = _MainLog;
var loggerToDispose = _MainLog;
_MainLog = new CSilentLogger();
(loggerToDispose as IDisposable)?.Dispose();
@@ -146,7 +149,7 @@ namespace VocaluxeLib.Log
if (!(_SongLog is CSilentLogger))
{
ILogger loggerToDispose = _SongLog;
var loggerToDispose = _SongLog;
_SongLog = new CSilentLogger();
(loggerToDispose as IDisposable)?.Dispose();
@@ -154,7 +157,6 @@ namespace VocaluxeLib.Log
// Delete the crash marker
File.Delete(_CrashMarkerFilePath);
}
/// <summary>
@@ -169,7 +171,8 @@ namespace VocaluxeLib.Log
// Flush the _MainLogStringWriter to get the latest entries to _MainLogStringBuilder
_MainLogStringWriter.Flush();
// Show the Reporter
_ShowReporterFunc(crash: crash, showContinue: showContinue, vocaluxeVersionTag: _CurrentVersion, log: _MainLogStringBuilder.ToString(), lastError: _FormatMessageTemplate(messageTemplate, propertyValues));
_ShowReporterFunc(crash: crash, showContinue: showContinue, vocaluxeVersionTag: _CurrentVersion, log: _MainLogStringBuilder.ToString(),
lastError: _FormatMessageTemplate(messageTemplate, propertyValues));
// Delete the crash marker (we do not want to show this error again on the next restart)
if (!showContinue)
@@ -191,16 +194,18 @@ namespace VocaluxeLib.Log
return template;
}
Regex theRegex = new Regex(@"{[^}]+}");
int i = 0;
var theRegex = new Regex(@"{[^}]+}");
var i = 0;
return theRegex.Replace(template, delegate(Match match)
{
if (i >= propertyValues.Length)
{
return match.Value;
}
return "\"" + propertyValues[i++] + "\"";
});
}
}
}
}
+256 -164
View File
@@ -34,9 +34,7 @@ namespace VocaluxeLib.Log
return propertyValues;
}
#region Verbose functions
/// <summary>
/// Write an event with the Verbose level to the Verbose log.
/// </summary>
@@ -46,14 +44,18 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_MainLog.Verbose(messageTemplate);
{
_MainLog.Verbose(messageTemplate);
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, null);
}
}
/// <summary>
@@ -66,11 +68,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
@@ -84,8 +87,11 @@ namespace VocaluxeLib.Log
_MainLog.Verbose(messageTemplate, propertyValues);
}
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, propertyValues);
}
}
/// <summary>
@@ -98,14 +104,18 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_MainLog.Verbose( exception, messageTemplate);
_MainLog.Verbose(exception, messageTemplate);
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, null);
}
}
/// <summary>
@@ -119,11 +129,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
@@ -137,14 +148,15 @@ namespace VocaluxeLib.Log
_MainLog.Verbose(exception, messageTemplate, propertyValues);
}
}
if(show)
ShowLogAssistant(messageTemplate, propertyValues);
}
if (show)
{
ShowLogAssistant(messageTemplate, propertyValues);
}
}
#endregion
#region Debug functions
/// <summary>
/// Write an event with the Debug level to the Debug log.
/// </summary>
@@ -154,14 +166,18 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_MainLog.Debug(messageTemplate);
{
_MainLog.Debug(messageTemplate);
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, null);
}
}
/// <summary>
@@ -174,11 +190,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
@@ -192,8 +209,11 @@ namespace VocaluxeLib.Log
_MainLog.Debug(messageTemplate, propertyValues);
}
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, propertyValues);
}
}
/// <summary>
@@ -206,14 +226,18 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_MainLog.Debug( exception, messageTemplate);
_MainLog.Debug(exception, messageTemplate);
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, null);
}
}
/// <summary>
@@ -227,11 +251,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
@@ -245,14 +270,15 @@ namespace VocaluxeLib.Log
_MainLog.Debug(exception, messageTemplate, propertyValues);
}
}
if(show)
ShowLogAssistant(messageTemplate, propertyValues);
}
if (show)
{
ShowLogAssistant(messageTemplate, propertyValues);
}
}
#endregion
#region Information functions
/// <summary>
/// Write an event with the Information level to the Information log.
/// </summary>
@@ -262,14 +288,18 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_MainLog.Information(messageTemplate);
{
_MainLog.Information(messageTemplate);
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, null);
}
}
/// <summary>
@@ -282,11 +312,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
@@ -300,8 +331,11 @@ namespace VocaluxeLib.Log
_MainLog.Information(messageTemplate, propertyValues);
}
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, propertyValues);
}
}
/// <summary>
@@ -314,14 +348,18 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_MainLog.Information( exception, messageTemplate);
_MainLog.Information(exception, messageTemplate);
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, null);
}
}
/// <summary>
@@ -335,11 +373,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
@@ -353,14 +392,15 @@ namespace VocaluxeLib.Log
_MainLog.Information(exception, messageTemplate, propertyValues);
}
}
if(show)
ShowLogAssistant(messageTemplate, propertyValues);
}
if (show)
{
ShowLogAssistant(messageTemplate, propertyValues);
}
}
#endregion
#region Warning functions
/// <summary>
/// Write an event with the Warning level to the Warning log.
/// </summary>
@@ -370,14 +410,18 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_MainLog.Warning(messageTemplate);
{
_MainLog.Warning(messageTemplate);
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, null);
}
}
/// <summary>
@@ -390,11 +434,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
@@ -408,8 +453,11 @@ namespace VocaluxeLib.Log
_MainLog.Warning(messageTemplate, propertyValues);
}
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, propertyValues);
}
}
/// <summary>
@@ -422,14 +470,18 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_MainLog.Warning( exception, messageTemplate);
_MainLog.Warning(exception, messageTemplate);
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, null);
}
}
/// <summary>
@@ -443,11 +495,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
@@ -461,14 +514,15 @@ namespace VocaluxeLib.Log
_MainLog.Warning(exception, messageTemplate, propertyValues);
}
}
if(show)
ShowLogAssistant(messageTemplate, propertyValues);
}
if (show)
{
ShowLogAssistant(messageTemplate, propertyValues);
}
}
#endregion
#region Error functions
/// <summary>
/// Write an event with the Error level to the Error log.
/// </summary>
@@ -478,14 +532,18 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_MainLog.Error(messageTemplate);
{
_MainLog.Error(messageTemplate);
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, null);
}
}
/// <summary>
@@ -498,11 +556,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
@@ -516,8 +575,11 @@ namespace VocaluxeLib.Log
_MainLog.Error(messageTemplate, propertyValues);
}
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, propertyValues);
}
}
/// <summary>
@@ -530,14 +592,18 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_MainLog.Error( exception, messageTemplate);
_MainLog.Error(exception, messageTemplate);
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, null);
}
}
/// <summary>
@@ -551,11 +617,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
@@ -569,14 +636,15 @@ namespace VocaluxeLib.Log
_MainLog.Error(exception, messageTemplate, propertyValues);
}
}
if(show)
ShowLogAssistant(messageTemplate, propertyValues);
}
if (show)
{
ShowLogAssistant(messageTemplate, propertyValues);
}
}
#endregion
#region Fatal functions
/// <summary>
/// Write an event with the Fatal level to the Fatal log and TERMINATES the appication.
/// </summary>
@@ -586,14 +654,18 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_MainLog.Fatal(messageTemplate);
{
_MainLog.Fatal(messageTemplate);
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, null, true, false);
}
// Close logs and exit
Close();
@@ -610,11 +682,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
@@ -628,8 +701,11 @@ namespace VocaluxeLib.Log
_MainLog.Fatal(messageTemplate, propertyValues);
}
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, propertyValues, true, false);
}
// Close logs and exit
Close();
@@ -646,14 +722,18 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_MainLog.Fatal( exception, messageTemplate);
_MainLog.Fatal(exception, messageTemplate);
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, null, true, false);
}
// Close logs and exit
Close();
@@ -671,11 +751,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
@@ -689,22 +770,22 @@ namespace VocaluxeLib.Log
_MainLog.Fatal(exception, messageTemplate, propertyValues);
}
}
if(show)
if (show)
{
ShowLogAssistant(messageTemplate, propertyValues, true, false);
}
// Close logs and exit
Close();
Environment.Exit(Environment.ExitCode);
}
#endregion
[SuppressMessage("ReSharper", "MemberHidesStaticFromOuterClass")]
public static class CSongLog
public static class CSongLog
{
#region Verbose functions
/// <summary>
/// Write an event with the Verbose level to the Verbose log.
/// </summary>
@@ -713,11 +794,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -1)
public static void Verbose(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "",
[CallerLineNumber] int callerLineNumber = -1)
{
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
{
_SongLog.Verbose(messageTemplate);
{
_SongLog.Verbose(messageTemplate);
}
}
@@ -730,12 +812,13 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
using (LogContext.PushProperty("AdditionalData", propertyValues.Skip(usedPropertiesCount)))
@@ -759,11 +842,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_SongLog.Verbose( exception, messageTemplate);
_SongLog.Verbose(exception, messageTemplate);
}
}
@@ -777,12 +861,13 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
using (LogContext.PushProperty("AdditionalData", propertyValues.Skip(usedPropertiesCount)))
@@ -796,11 +881,9 @@ namespace VocaluxeLib.Log
}
}
}
#endregion
#region Debug functions
/// <summary>
/// Write an event with the Debug level to the Debug log.
/// </summary>
@@ -809,11 +892,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -1)
public static void Debug(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "",
[CallerLineNumber] int callerLineNumber = -1)
{
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
{
_SongLog.Debug(messageTemplate);
{
_SongLog.Debug(messageTemplate);
}
}
@@ -826,12 +910,13 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
using (LogContext.PushProperty("AdditionalData", propertyValues.Skip(usedPropertiesCount)))
@@ -855,11 +940,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_SongLog.Debug( exception, messageTemplate);
_SongLog.Debug(exception, messageTemplate);
}
}
@@ -873,12 +959,13 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
using (LogContext.PushProperty("AdditionalData", propertyValues.Skip(usedPropertiesCount)))
@@ -892,11 +979,9 @@ namespace VocaluxeLib.Log
}
}
}
#endregion
#region Information functions
/// <summary>
/// Write an event with the Information level to the Information log.
/// </summary>
@@ -905,11 +990,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -1)
public static void Information(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "",
[CallerLineNumber] int callerLineNumber = -1)
{
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
{
_SongLog.Information(messageTemplate);
{
_SongLog.Information(messageTemplate);
}
}
@@ -922,12 +1008,13 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
using (LogContext.PushProperty("AdditionalData", propertyValues.Skip(usedPropertiesCount)))
@@ -951,11 +1038,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_SongLog.Information( exception, messageTemplate);
_SongLog.Information(exception, messageTemplate);
}
}
@@ -969,12 +1057,13 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
using (LogContext.PushProperty("AdditionalData", propertyValues.Skip(usedPropertiesCount)))
@@ -988,11 +1077,9 @@ namespace VocaluxeLib.Log
}
}
}
#endregion
#region Warning functions
/// <summary>
/// Write an event with the Warning level to the Warning log.
/// </summary>
@@ -1001,11 +1088,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -1)
public static void Warning(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "",
[CallerLineNumber] int callerLineNumber = -1)
{
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
{
_SongLog.Warning(messageTemplate);
{
_SongLog.Warning(messageTemplate);
}
}
@@ -1018,12 +1106,13 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
using (LogContext.PushProperty("AdditionalData", propertyValues.Skip(usedPropertiesCount)))
@@ -1047,11 +1136,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_SongLog.Warning( exception, messageTemplate);
_SongLog.Warning(exception, messageTemplate);
}
}
@@ -1065,12 +1155,13 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
using (LogContext.PushProperty("AdditionalData", propertyValues.Skip(usedPropertiesCount)))
@@ -1084,11 +1175,9 @@ namespace VocaluxeLib.Log
}
}
}
#endregion
#region Error functions
/// <summary>
/// Write an event with the Error level to the Error log.
/// </summary>
@@ -1097,11 +1186,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -1)
public static void Error(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "",
[CallerLineNumber] int callerLineNumber = -1)
{
using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumber }))
{
_SongLog.Error(messageTemplate);
{
_SongLog.Error(messageTemplate);
}
}
@@ -1114,12 +1204,13 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
using (LogContext.PushProperty("AdditionalData", propertyValues.Skip(usedPropertiesCount)))
@@ -1143,11 +1234,12 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
_SongLog.Error( exception, messageTemplate);
_SongLog.Error(exception, messageTemplate);
}
}
@@ -1161,12 +1253,13 @@ namespace VocaluxeLib.Log
/// <param name="callerFilePath">Don't use! The filepath 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 callerLineNumber = -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, callerLineNumber }))
{
int usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
var usedPropertiesCount = _PropertiesRegex.Matches(messageTemplate).Cast<Match>().Select(m => m.Value).Distinct().Count();
if (propertyValues.Length > usedPropertiesCount)
{
using (LogContext.PushProperty("AdditionalData", propertyValues.Skip(usedPropertiesCount)))
@@ -1180,7 +1273,6 @@ namespace VocaluxeLib.Log
}
}
}
#endregion
}
}
+1 -1
View File
@@ -53,4 +53,4 @@ namespace VocaluxeLib.Log
}
}
}
}
}
@@ -42,4 +42,4 @@ namespace VocaluxeLib.Log.Enricher
}
}
}
}
}
+15 -11
View File
@@ -16,7 +16,6 @@
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
@@ -28,12 +27,12 @@ namespace VocaluxeLib.Log.Rolling
{
_DeleteOldLogs(mainLogFile, numLogsToKeep);
string currentSourceFile = _GenerateRollLogFileName(mainLogFile, numLogsToKeep);
var currentSourceFile = _GenerateRollLogFileName(mainLogFile, numLogsToKeep);
for (var i = numLogsToKeep; i > 1; i--)
{
string currentTargetFile = currentSourceFile;
var currentTargetFile = currentSourceFile;
currentSourceFile = _GenerateRollLogFileName(mainLogFile, i - 1);
if (File.Exists(currentSourceFile))
@@ -57,9 +56,13 @@ namespace VocaluxeLib.Log.Rolling
try
{
if (numLogsToKeep > 0)
{
File.Move(mainLogFile, currentSourceFile);
}
else
{
File.Delete(mainLogFile);
}
}
catch (Exception e)
{
@@ -73,14 +76,16 @@ namespace VocaluxeLib.Log.Rolling
private static void _DeleteOldLogs(string mainLogFile, int numLogsToKeep)
{
Regex r = new Regex($"{Regex.Escape(Path.GetDirectoryName(mainLogFile)??"")}\\{Path.DirectorySeparatorChar}{Regex.Escape(Path.GetFileNameWithoutExtension(mainLogFile)??"")}_([0-9]+){Path.GetExtension(mainLogFile)}", RegexOptions.IgnoreCase);
IEnumerable<string> logFiles = Directory.EnumerateFiles($"{Path.GetDirectoryName(mainLogFile)}", $"{Path.GetFileNameWithoutExtension(mainLogFile)}*{Path.GetExtension(mainLogFile)}");
foreach (string file in logFiles)
var r = new Regex(
$"{Regex.Escape(Path.GetDirectoryName(mainLogFile) ?? "")}\\{Path.DirectorySeparatorChar}{Regex.Escape(Path.GetFileNameWithoutExtension(mainLogFile) ?? "")}_([0-9]+){Path.GetExtension(mainLogFile)}",
RegexOptions.IgnoreCase);
var logFiles = Directory.EnumerateFiles($"{Path.GetDirectoryName(mainLogFile)}", $"{Path.GetFileNameWithoutExtension(mainLogFile)}*{Path.GetExtension(mainLogFile)}");
foreach (var file in logFiles)
{
Match m = r.Match(file);
var m = r.Match(file);
if (m.Success)
{
int logNum = -1;
var logNum = -1;
Int32.TryParse(m.Groups[1].Value, out logNum);
if (logNum < 0 || logNum > numLogsToKeep - 1)
@@ -96,7 +101,6 @@ namespace VocaluxeLib.Log.Rolling
Console.WriteLine($"Error deleting old log file: {e.Message}");
#endif
}
}
}
}
@@ -104,7 +108,7 @@ namespace VocaluxeLib.Log.Rolling
private static string _GenerateRollLogFileName(string mainLogFile, int number)
{
return $"{ Path.GetDirectoryName(mainLogFile) }{ Path.DirectorySeparatorChar }{ Path.GetFileNameWithoutExtension(mainLogFile) }_{ number }{ Path.GetExtension(mainLogFile) }";
return $"{Path.GetDirectoryName(mainLogFile)}{Path.DirectorySeparatorChar}{Path.GetFileNameWithoutExtension(mainLogFile)}_{number}{Path.GetExtension(mainLogFile)}";
}
}
}
}
+71 -213
View File
@@ -49,294 +49,152 @@ namespace VocaluxeLib.Log.Serilog
return this;
}
public void Write(LogEvent logEvent)
{
}
public void Write(LogEvent logEvent) { }
public void Write(LogEventLevel level, string messageTemplate)
{
}
public void Write(LogEventLevel level, string messageTemplate) { }
public void Write<T>(LogEventLevel level, string messageTemplate, T propertyValue)
{
}
public void Write<T>(LogEventLevel level, string messageTemplate, T propertyValue) { }
public void Write<T0, T1>(LogEventLevel level, string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Write<T0, T1>(LogEventLevel level, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Write<T0, T1, T2>(LogEventLevel level, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Write<T0, T1, T2>(LogEventLevel level, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Write(LogEventLevel level, string messageTemplate, params object[] propertyValues)
{
}
public void Write(LogEventLevel level, string messageTemplate, params object[] propertyValues) { }
public void Write(LogEventLevel level, Exception exception, string messageTemplate)
{
}
public void Write(LogEventLevel level, Exception exception, string messageTemplate) { }
public void Write<T>(LogEventLevel level, Exception exception, string messageTemplate, T propertyValue)
{
}
public void Write<T>(LogEventLevel level, Exception exception, string messageTemplate, T propertyValue) { }
public void Write<T0, T1>(LogEventLevel level, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Write<T0, T1>(LogEventLevel level, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Write<T0, T1, T2>(LogEventLevel level, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Write<T0, T1, T2>(LogEventLevel level, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Write(LogEventLevel level, Exception exception, string messageTemplate, params object[] propertyValues)
{
}
public void Write(LogEventLevel level, Exception exception, string messageTemplate, params object[] propertyValues) { }
public bool IsEnabled(LogEventLevel level)
{
return false;
}
public void Verbose(string messageTemplate)
{
}
public void Verbose(string messageTemplate) { }
public void Verbose<T>(string messageTemplate, T propertyValue)
{
}
public void Verbose<T>(string messageTemplate, T propertyValue) { }
public void Verbose<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Verbose<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Verbose<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Verbose<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Verbose(string messageTemplate, params object[] propertyValues)
{
}
public void Verbose(string messageTemplate, params object[] propertyValues) { }
public void Verbose(Exception exception, string messageTemplate)
{
}
public void Verbose(Exception exception, string messageTemplate) { }
public void Verbose<T>(Exception exception, string messageTemplate, T propertyValue)
{
}
public void Verbose<T>(Exception exception, string messageTemplate, T propertyValue) { }
public void Verbose<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Verbose<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Verbose<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Verbose<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Verbose(Exception exception, string messageTemplate, params object[] propertyValues)
{
}
public void Verbose(Exception exception, string messageTemplate, params object[] propertyValues) { }
public void Debug(string messageTemplate)
{
}
public void Debug(string messageTemplate) { }
public void Debug<T>(string messageTemplate, T propertyValue)
{
}
public void Debug<T>(string messageTemplate, T propertyValue) { }
public void Debug<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Debug<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Debug<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Debug<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Debug(string messageTemplate, params object[] propertyValues)
{
}
public void Debug(string messageTemplate, params object[] propertyValues) { }
public void Debug(Exception exception, string messageTemplate)
{
}
public void Debug(Exception exception, string messageTemplate) { }
public void Debug<T>(Exception exception, string messageTemplate, T propertyValue)
{
}
public void Debug<T>(Exception exception, string messageTemplate, T propertyValue) { }
public void Debug<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Debug<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Debug<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Debug<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Debug(Exception exception, string messageTemplate, params object[] propertyValues)
{
}
public void Debug(Exception exception, string messageTemplate, params object[] propertyValues) { }
public void Information(string messageTemplate)
{
}
public void Information(string messageTemplate) { }
public void Information<T>(string messageTemplate, T propertyValue)
{
}
public void Information<T>(string messageTemplate, T propertyValue) { }
public void Information<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Information<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Information<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Information<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Information(string messageTemplate, params object[] propertyValues)
{
}
public void Information(string messageTemplate, params object[] propertyValues) { }
public void Information(Exception exception, string messageTemplate)
{
}
public void Information(Exception exception, string messageTemplate) { }
public void Information<T>(Exception exception, string messageTemplate, T propertyValue)
{
}
public void Information<T>(Exception exception, string messageTemplate, T propertyValue) { }
public void Information<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Information<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Information<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Information<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Information(Exception exception, string messageTemplate, params object[] propertyValues)
{
}
public void Information(Exception exception, string messageTemplate, params object[] propertyValues) { }
public void Warning(string messageTemplate)
{
}
public void Warning(string messageTemplate) { }
public void Warning<T>(string messageTemplate, T propertyValue)
{
}
public void Warning<T>(string messageTemplate, T propertyValue) { }
public void Warning<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Warning<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Warning<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Warning<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Warning(string messageTemplate, params object[] propertyValues)
{
}
public void Warning(string messageTemplate, params object[] propertyValues) { }
public void Warning(Exception exception, string messageTemplate)
{
}
public void Warning(Exception exception, string messageTemplate) { }
public void Warning<T>(Exception exception, string messageTemplate, T propertyValue)
{
}
public void Warning<T>(Exception exception, string messageTemplate, T propertyValue) { }
public void Warning<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Warning<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Warning<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Warning<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Warning(Exception exception, string messageTemplate, params object[] propertyValues)
{
}
public void Warning(Exception exception, string messageTemplate, params object[] propertyValues) { }
public void Error(string messageTemplate)
{
}
public void Error(string messageTemplate) { }
public void Error<T>(string messageTemplate, T propertyValue)
{
}
public void Error<T>(string messageTemplate, T propertyValue) { }
public void Error<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Error<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Error<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Error<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Error(string messageTemplate, params object[] propertyValues)
{
}
public void Error(string messageTemplate, params object[] propertyValues) { }
public void Error(Exception exception, string messageTemplate)
{
}
public void Error(Exception exception, string messageTemplate) { }
public void Error<T>(Exception exception, string messageTemplate, T propertyValue)
{
}
public void Error<T>(Exception exception, string messageTemplate, T propertyValue) { }
public void Error<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Error<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Error<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Error<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Error(Exception exception, string messageTemplate, params object[] propertyValues)
{
}
public void Error(Exception exception, string messageTemplate, params object[] propertyValues) { }
public void Fatal(string messageTemplate)
{
}
public void Fatal(string messageTemplate) { }
public void Fatal<T>(string messageTemplate, T propertyValue)
{
}
public void Fatal<T>(string messageTemplate, T propertyValue) { }
public void Fatal<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Fatal<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Fatal<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Fatal<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Fatal(string messageTemplate, params object[] propertyValues)
{
}
public void Fatal(string messageTemplate, params object[] propertyValues) { }
public void Fatal(Exception exception, string messageTemplate)
{
}
public void Fatal(Exception exception, string messageTemplate) { }
public void Fatal<T>(Exception exception, string messageTemplate, T propertyValue)
{
}
public void Fatal<T>(Exception exception, string messageTemplate, T propertyValue) { }
public void Fatal<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)
{
}
public void Fatal<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { }
public void Fatal<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)
{
}
public void Fatal<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { }
public void Fatal(Exception exception, string messageTemplate, params object[] propertyValues)
{
}
public void Fatal(Exception exception, string messageTemplate, params object[] propertyValues) { }
[MessageTemplateFormatMethod("messageTemplate")]
public bool BindMessageTemplate(string messageTemplate, object[] propertyValues, out MessageTemplate parsedTemplate, out IEnumerable<LogEventProperty> boundProperties)
+1 -1
View File
@@ -26,4 +26,4 @@ namespace VocaluxeLib.Log
/// <param name="log">The log to submit.</param>
/// <param name="lastError">The last error message.</param>
public delegate void ShowReporterDelegate(bool crash, bool showContinue, string vocaluxeVersionTag, string log, string lastError);
}
}