/// <summary> /// Logging to WorkerLog File /// </summary> /// <param name="loginfo"></param> public static void LogActionTrackerInfo(string loginfo) { Dictionary <string, object> obj = new Dictionary <string, object>(); ELKLogger.Log(loginfo, obj); }
/// <summary> /// Log the Errors to ELK as Error. The error message, source and innerexception will be logged. /// </summary> /// <param name="ex"></param> /// <param name="attributes"></param> public static void LogException(Exception ex, Dictionary <string, object> attributes = null) { if (attributes != null) { attributes.Add("stackTrace", ex.StackTrace); attributes.Add("innerException", ex.InnerException); } ELKLogger.LogException(ex.Message, attributes); }