ExcelDna icon indicating copy to clipboard operation
ExcelDna copied to clipboard

Include more detailed info into the Logger.Error(Exception ex, string message, params object[] args) method

Open fandrei opened this issue 3 years ago • 1 comments

At the current moment it only includes Exception.Message into the logged message, what isn't much useful for generic exceptions like NullRefException etc. It would be better to include stack trace, for instance:

Log(TraceEventType.Error, "{0} : {1} - {2}", message, ex.GetType().Name, ex.ToString().Replace("\r\n", " \\r\\n "));

fandrei avatar Nov 07 '21 20:11 fandrei

+1 for this

HughGrovesArup avatar Aug 12 '22 15:08 HughGrovesArup