/// <summary> /// Logs an informative message. /// </summary> /// <param name="callingType"> /// The calling type. /// </param> /// <param name="message"> /// The message. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> public void Debug(Type callingType, string message, IExtendedLoggerData loggerData) { _umbracoLogger.Debug(callingType, () => message); if (_hasRemoteLogger && this._remoteLogger.IsReady) { _remoteLogger.Debug(callingType, message, loggerData); } }
/// <summary> /// Logs a debug message. /// </summary> /// <param name="callingType"> /// The calling type. /// </param> /// <param name="message"> /// The message. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> public static void Debug(Type callingType, string message, IExtendedLoggerData loggerData) { if (MultiLogResolver.HasCurrent == false || MultiLogResolver.Current.HasValue == false) { return; } MultiLogResolver.Current.Logger.Debug(callingType, message, loggerData); }
/// <summary> /// Logs an error with extra log data. /// </summary> /// <param name="callingType"> /// The calling type. /// </param> /// <param name="message"> /// The message. /// </param> /// <param name="exception"> /// The exception. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> public void Error(Type callingType, string message, Exception exception, IExtendedLoggerData loggerData) { _umbracoLogger.Error(callingType, message, exception); if (_hasRemoteLogger && this._remoteLogger.IsReady) { _remoteLogger.Error(callingType, message, exception, loggerData); } }
/// <summary> /// Initializes the controller. /// </summary> private void Initialize() { _logData = MultiLogger.GetBaseLoggingData(); _logData.AddCategory("Pluggable"); try { _provider = PluggableObjectHelper.GetInstance <PluginViewEditorProvider>("PluginViewEditorProvider"); } catch (Exception ex) { MultiLogHelper.Error <PluginViewEditorApiController>("Failed to instantiate PlugViewEditorProvider", ex, _logData); throw; } }
/// <summary> /// Logs debug information. /// </summary> /// <param name="callingType"> /// The calling type. /// </param> /// <param name="message"> /// The message. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> public abstract void Debug(Type callingType, string message, IExtendedLoggerData loggerData);
/// <summary> /// Logs a debug message. /// </summary> /// <typeparam name="T"> /// The calling type /// </typeparam> /// <param name="message"> /// The message. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> public static void Debug <T>(string message, IExtendedLoggerData loggerData) { Debug(typeof(T), message, loggerData); }
/// <summary> /// Logs an informative message /// </summary> /// <param name="message"> /// The message. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> /// <typeparam name="T"> /// The calling type /// </typeparam> public static void Info <T>(string message, IExtendedLoggerData loggerData) { Info(typeof(T), message, loggerData); }
/// <summary> /// Logs a warning with an exception. /// </summary> /// <param name="callingType"> /// The calling type. /// </param> /// <param name="message"> /// The message. /// </param> /// <param name="exception"> /// The exception. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> public static void WarnWithException(Type callingType, string message, Exception exception, IExtendedLoggerData loggerData) { if (MultiLogResolver.HasCurrent == false || MultiLogResolver.Current.HasValue == false) { return; } MultiLogResolver.Current.Logger.WarnWithException(callingType, message, exception, loggerData); }
/// <summary> /// Logs a warning with an exception. /// </summary> /// <param name="message"> /// The message. /// </param> /// <param name="exception"> /// The exception. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> /// <typeparam name="T"> /// The calling type /// </typeparam> public static void WarnWithException <T>(string message, Exception exception, IExtendedLoggerData loggerData) { WarnWithException(typeof(T), message, exception, loggerData); }
/// <summary> /// Logs a warning /// </summary> /// <param name="message"> /// The message. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> /// <typeparam name="T"> /// The calling type /// </typeparam> public static void Warn <T>(string message, IExtendedLoggerData loggerData) { Warn(typeof(T), message, loggerData); }
/// <summary> /// Logs an error. /// </summary> /// <param name="message"> /// The message. /// </param> /// <param name="exception"> /// The exception. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> /// <typeparam name="T"> /// The calling type /// </typeparam> public static void Error <T>(string message, Exception exception, IExtendedLoggerData loggerData) { Error(typeof(T), message, exception, loggerData); }
/// <summary> /// Logs a warning with extra log data. /// </summary> /// <param name="callingType"> /// The calling type. /// </param> /// <param name="message"> /// The message. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> public void Warn(Type callingType, string message, IExtendedLoggerData loggerData) { _umbracoLogger.Warn(callingType, message); if (_hasRemoteLogger && this._remoteLogger.IsReady) _remoteLogger.Warn(callingType, message, loggerData); }
/// <summary> /// Logs a warning with an exception. /// </summary> /// <param name="callingType"> /// The calling type. /// </param> /// <param name="message"> /// The message. /// </param> /// <param name="exception"> /// The exception. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> public abstract void WarnWithException(Type callingType, string message, Exception exception, IExtendedLoggerData loggerData);
/// <summary> /// Initializes the controller. /// </summary> private void Initialize() { _logData = MultiLogger.GetBaseLoggingData(); _logData.AddCategory("Pluggable"); try { _provider = PluggableObjectHelper.GetInstance<PluginViewEditorProvider>("PluginViewEditorProvider"); } catch (Exception ex) { MultiLogHelper.Error<PluginViewEditorApiController>("Failed to instantiate PlugViewEditorProvider", ex, _logData); throw; } }
/// <summary> /// Does nothing. /// </summary> /// <param name="callingType"> /// The calling type. /// </param> /// <param name="message"> /// The message. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> public override void Info(Type callingType, string message, IExtendedLoggerData loggerData) { return; }
/// <summary> /// Does nothing. /// </summary> /// <param name="callingType"> /// The calling type. /// </param> /// <param name="message"> /// The message. /// </param> /// <param name="exception"> /// The exception. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> public override void WarnWithException(Type callingType, string message, Exception exception, IExtendedLoggerData loggerData) { return; }
/// <summary> /// Warns with an exception. /// </summary> /// <param name="callingType"> /// The calling type. /// </param> /// <param name="message"> /// The message. /// </param> /// <param name="exception"> /// The exception. /// </param> /// <param name="loggerData"> /// The logger data. /// </param> public void WarnWithException(Type callingType, string message, Exception exception, IExtendedLoggerData loggerData) { _umbracoLogger.WarnWithException(callingType, message, exception); if (_hasRemoteLogger && this._remoteLogger.IsReady) _remoteLogger.WarnWithException(callingType, message, exception); }