using System; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using Serilog.Context; using Serilog.Core; namespace VocaluxeLib.Log { public static partial class CLog { public static object[] Params(params object[] propertyValues) { return propertyValues; } #region Verbose functions /// /// Write an event with the Verbose level to the Verbose log. /// /// Message template for this event. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Verbose(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Verbose(messageTemplate); } if(show) _ShowLogAssistent(messageTemplate, null, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Verbose level with additional propertyValues to the Verbose log. /// /// Message template for this event. /// Data inserted into the message template. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Verbose(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Verbose(messageTemplate, propertyValues); } if(show) _ShowLogAssistent(messageTemplate, propertyValues, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Verbose level and associated exception to the Verbose log. /// /// Exception of this event. /// Message template for this event. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Verbose(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Verbose( exception, messageTemplate); } if(show) _ShowLogAssistent(messageTemplate, null, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Verbose level with additional propertyValues and associated exception to the Verbose log. /// /// Exception of this event. /// Message template for this event. /// Data inserted into the message template. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [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) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Verbose(exception, messageTemplate, propertyValues); } if(show) _ShowLogAssistent(messageTemplate, propertyValues, callerMethodeName, callerFilePath, callerLineNumer); } #endregion #region Debug functions /// /// Write an event with the Debug level to the Debug log. /// /// Message template for this event. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Debug(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Debug(messageTemplate); } if(show) _ShowLogAssistent(messageTemplate, null, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Debug level with additional propertyValues to the Debug log. /// /// Message template for this event. /// Data inserted into the message template. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Debug(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Debug(messageTemplate, propertyValues); } if(show) _ShowLogAssistent(messageTemplate, propertyValues, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Debug level and associated exception to the Debug log. /// /// Exception of this event. /// Message template for this event. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Debug(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Debug( exception, messageTemplate); } if(show) _ShowLogAssistent(messageTemplate, null, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Debug level with additional propertyValues and associated exception to the Debug log. /// /// Exception of this event. /// Message template for this event. /// Data inserted into the message template. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [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) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Debug(exception, messageTemplate, propertyValues); } if(show) _ShowLogAssistent(messageTemplate, propertyValues, callerMethodeName, callerFilePath, callerLineNumer); } #endregion #region Information functions /// /// Write an event with the Information level to the Information log. /// /// Message template for this event. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Information(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Information(messageTemplate); } if(show) _ShowLogAssistent(messageTemplate, null, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Information level with additional propertyValues to the Information log. /// /// Message template for this event. /// Data inserted into the message template. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Information(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Information(messageTemplate, propertyValues); } if(show) _ShowLogAssistent(messageTemplate, propertyValues, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Information level and associated exception to the Information log. /// /// Exception of this event. /// Message template for this event. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Information(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Information( exception, messageTemplate); } if(show) _ShowLogAssistent(messageTemplate, null, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Information level with additional propertyValues and associated exception to the Information log. /// /// Exception of this event. /// Message template for this event. /// Data inserted into the message template. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [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) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Information(exception, messageTemplate, propertyValues); } if(show) _ShowLogAssistent(messageTemplate, propertyValues, callerMethodeName, callerFilePath, callerLineNumer); } #endregion #region Warning functions /// /// Write an event with the Warning level to the Warning log. /// /// Message template for this event. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Warning(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Warning(messageTemplate); } if(show) _ShowLogAssistent(messageTemplate, null, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Warning level with additional propertyValues to the Warning log. /// /// Message template for this event. /// Data inserted into the message template. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Warning(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Warning(messageTemplate, propertyValues); } if(show) _ShowLogAssistent(messageTemplate, propertyValues, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Warning level and associated exception to the Warning log. /// /// Exception of this event. /// Message template for this event. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Warning(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Warning( exception, messageTemplate); } if(show) _ShowLogAssistent(messageTemplate, null, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Warning level with additional propertyValues and associated exception to the Warning log. /// /// Exception of this event. /// Message template for this event. /// Data inserted into the message template. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [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) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Warning(exception, messageTemplate, propertyValues); } if(show) _ShowLogAssistent(messageTemplate, propertyValues, callerMethodeName, callerFilePath, callerLineNumer); } #endregion #region Error functions /// /// Write an event with the Error level to the Error log. /// /// Message template for this event. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Error(string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Error(messageTemplate); } if(show) _ShowLogAssistent(messageTemplate, null, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Error level with additional propertyValues to the Error log. /// /// Message template for this event. /// Data inserted into the message template. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Error(string messageTemplate, object[] propertyValues, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Error(messageTemplate, propertyValues); } if(show) _ShowLogAssistent(messageTemplate, propertyValues, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Error level and associated exception to the Error log. /// /// Exception of this event. /// Message template for this event. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Error(Exception exception, string messageTemplate, bool show = false, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Error( exception, messageTemplate); } if(show) _ShowLogAssistent(messageTemplate, null, callerMethodeName, callerFilePath, callerLineNumer); } /// /// Write an event with the Error level with additional propertyValues and associated exception to the Error log. /// /// Exception of this event. /// Message template for this event. /// Data inserted into the message template. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [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) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Error(exception, messageTemplate, propertyValues); } if(show) _ShowLogAssistent(messageTemplate, propertyValues, callerMethodeName, callerFilePath, callerLineNumer); } #endregion #region Fatal functions /// /// Write an event with the Fatal level to the Fatal log and TERMINATES the appication. /// /// Message template for this event. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Fatal(string messageTemplate, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Fatal(messageTemplate); } if(show) _ShowLogAssistent(messageTemplate, null, callerMethodeName, callerFilePath, callerLineNumer); // Close logs and exit Close(); Environment.Exit(Environment.ExitCode); } /// /// Write an event with the Fatal level with additional propertyValues to the Fatal log and TERMINATES the appication. /// /// Message template for this event. /// Data inserted into the message template. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Fatal(string messageTemplate, object[] propertyValues, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Fatal(messageTemplate, propertyValues); } if(show) _ShowLogAssistent(messageTemplate, propertyValues, callerMethodeName, callerFilePath, callerLineNumer); // Close logs and exit Close(); Environment.Exit(Environment.ExitCode); } /// /// Write an event with the Fatal level and associated exception to the Fatal log and TERMINATES the appication. /// /// Exception of this event. /// Message template for this event. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Fatal(Exception exception, string messageTemplate, bool show = true, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Fatal( exception, messageTemplate); } if(show) _ShowLogAssistent(messageTemplate, null, callerMethodeName, callerFilePath, callerLineNumer); // Close logs and exit Close(); Environment.Exit(Environment.ExitCode); } /// /// Write an event with the Fatal level with additional propertyValues and associated exception to the Fatal log and TERMINATES the appication. /// /// Exception of this event. /// Message template for this event. /// Data inserted into the message template. /// True if an message should be shown to the user, false otherwise. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [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) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _MainLog.Fatal(exception, messageTemplate, propertyValues); } if(show) _ShowLogAssistent(messageTemplate, propertyValues, callerMethodeName, callerFilePath, callerLineNumer); // Close logs and exit Close(); Environment.Exit(Environment.ExitCode); } #endregion [SuppressMessage("ReSharper", "MemberHidesStaticFromOuterClass")] public static class CSongLog { #region Verbose functions /// /// Write an event with the Verbose level to the Verbose log. /// /// Message template for this event. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Verbose(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Verbose(messageTemplate); } } /// /// Write an event with the Verbose level with additional propertyValues to the Verbose log. /// /// Message template for this event. /// Data inserted into the message template. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Verbose(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Verbose(messageTemplate, propertyValues); } } /// /// Write an event with the Verbose level and associated exception to the Verbose log. /// /// Exception of this event. /// Message template for this event. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Verbose(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Verbose( exception, messageTemplate); } } /// /// Write an event with the Verbose level with additional propertyValues and associated exception to the Verbose log. /// /// Exception of this event. /// Message template for this event. /// Data inserted into the message template. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Verbose(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Verbose(exception, messageTemplate, propertyValues); } } #endregion #region Debug functions /// /// Write an event with the Debug level to the Debug log. /// /// Message template for this event. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Debug(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Debug(messageTemplate); } } /// /// Write an event with the Debug level with additional propertyValues to the Debug log. /// /// Message template for this event. /// Data inserted into the message template. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Debug(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Debug(messageTemplate, propertyValues); } } /// /// Write an event with the Debug level and associated exception to the Debug log. /// /// Exception of this event. /// Message template for this event. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Debug(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Debug( exception, messageTemplate); } } /// /// Write an event with the Debug level with additional propertyValues and associated exception to the Debug log. /// /// Exception of this event. /// Message template for this event. /// Data inserted into the message template. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Debug(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Debug(exception, messageTemplate, propertyValues); } } #endregion #region Information functions /// /// Write an event with the Information level to the Information log. /// /// Message template for this event. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Information(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Information(messageTemplate); } } /// /// Write an event with the Information level with additional propertyValues to the Information log. /// /// Message template for this event. /// Data inserted into the message template. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Information(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Information(messageTemplate, propertyValues); } } /// /// Write an event with the Information level and associated exception to the Information log. /// /// Exception of this event. /// Message template for this event. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Information(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Information( exception, messageTemplate); } } /// /// Write an event with the Information level with additional propertyValues and associated exception to the Information log. /// /// Exception of this event. /// Message template for this event. /// Data inserted into the message template. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Information(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Information(exception, messageTemplate, propertyValues); } } #endregion #region Warning functions /// /// Write an event with the Warning level to the Warning log. /// /// Message template for this event. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Warning(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Warning(messageTemplate); } } /// /// Write an event with the Warning level with additional propertyValues to the Warning log. /// /// Message template for this event. /// Data inserted into the message template. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Warning(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Warning(messageTemplate, propertyValues); } } /// /// Write an event with the Warning level and associated exception to the Warning log. /// /// Exception of this event. /// Message template for this event. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Warning(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Warning( exception, messageTemplate); } } /// /// Write an event with the Warning level with additional propertyValues and associated exception to the Warning log. /// /// Exception of this event. /// Message template for this event. /// Data inserted into the message template. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Warning(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Warning(exception, messageTemplate, propertyValues); } } #endregion #region Error functions /// /// Write an event with the Error level to the Error log. /// /// Message template for this event. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Error(string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Error(messageTemplate); } } /// /// Write an event with the Error level with additional propertyValues to the Error log. /// /// Message template for this event. /// Data inserted into the message template. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Error(string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Error(messageTemplate, propertyValues); } } /// /// Write an event with the Error level and associated exception to the Error log. /// /// Exception of this event. /// Message template for this event. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Error(Exception exception, string messageTemplate, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Error( exception, messageTemplate); } } /// /// Write an event with the Error level with additional propertyValues and associated exception to the Error log. /// /// Exception of this event. /// Message template for this event. /// Data inserted into the message template. /// Don't use! The methode name of the caller will be filled automatically by the compiler. /// Don't use! The filepath of the caller will be filled automatically by the compiler. /// Don't use! The line number of the caller will be filled automatically by the compiler. [MessageTemplateFormatMethod("messageTemplate")] public static void Error(Exception exception, string messageTemplate, object[] propertyValues, [CallerMemberName] string callerMethodeName = "", [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumer = -1) { using (LogContext.PushProperty("CallingContext", new { callerMethodeName, callerFilePath, callerLineNumer})) { _SongLog.Error(exception, messageTemplate, propertyValues); } } #endregion } } }