Skip to content

Commit 6ff7024

Browse files
committed
Logging: log exception message before stack trace
1 parent 964d2b5 commit 6ff7024

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/Libraries/SmartStore.Core/Logging/LoggingExtensions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public static void ErrorsAll(this ILogger logger, Exception exception, Customer
4747
while (exception != null)
4848
{
4949
FilteredLog(logger, LogLevel.Error, exception.Message, exception.StackTrace, exception, customer);
50-
5150
exception = exception.InnerException;
5251
}
5352
}
@@ -62,7 +61,7 @@ private static void FilteredLog(ILogger logger, LogLevel level, string message,
6261
{
6362
if (exception != null && fullMessage.IsEmpty())
6463
{
65-
fullMessage = exception.StackTrace;
64+
fullMessage = "{0}\n{1}\n{2}".FormatCurrent(exception.Message, new String('-', 20), exception.StackTrace);
6665
}
6766

6867
logger.InsertLog(level, message, fullMessage, customer);

0 commit comments

Comments
 (0)