private static void TestExceptionLogging() { void InnerFunc() { try { var str = "[[23"; // ReSharper disable once ObjectCreationAsStatement new Regex(str); } catch (Exception ex) { log.Error(ex); } } InnerFunc(); }
/// <summary> /// Insert [error] in the line /// </summary> /// <param name="ex"></param> public static void Error(Exception ex) { logger = new FileLogger(); logger.Error(ex); }
/// <summary> /// Insert [error] in the line /// </summary> /// <param name="message"></param> public static void Error(string message) { logger = new FileLogger(); logger.Error(message); }