-
-
Save cdeutsch/90d864e38d8bc3888c32 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Log (Exception ex, ReportSeverity severity= ReportSeverity.Error, | |
[CallerMemberName] string memberName = "", | |
[CallerFilePath] string sourceFilePath = "", | |
[CallerLineNumber] int sourceLineNumber = 0) | |
{ | |
try{ | |
Console.WriteLine (ex); | |
Console.WriteLine("{0} - {1} - {2} \r\n {3}",sourceFilePath,memberName,sourceLineNumber,ex); | |
Insights.Report (ex, new Dictionary<string,object>{ | |
{"Method",memberName}, | |
{"File Name",sourceFilePath}, | |
{"Line Number",sourceLineNumber}, | |
}, severity); | |
} catch (Exception ex1) { | |
Console.WriteLine (ex1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment