Skip to content

Commit 2e62536

Browse files
committed
Minor enhancement
1 parent 698ab2d commit 2e62536

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ public static void Fatal(this ILogger logger, string message, Exception exceptio
3232
FilteredLog(logger, LogLevel.Fatal, message, exception, customer);
3333
}
3434

35+
public static void Error(this ILogger logger, Exception exception, Customer customer = null)
36+
{
37+
FilteredLog(logger, LogLevel.Error, exception.Message, exception, customer);
38+
}
39+
3540
private static void FilteredLog(ILogger logger, LogLevel level, string message, Exception exception = null, Customer customer = null)
3641
{
3742
//don't log thread abort exception

src/Libraries/SmartStore.Services/Media/PictureService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,7 @@ protected int MovePictures(bool toDb)
873873
tx.Rollback();
874874
_settingService.SetSetting<bool>("Media.Images.StoreInDB", !toDb);
875875
_notifier.Error(ex.Message);
876+
_logger.Error(ex);
876877
}
877878
}
878879
}

0 commit comments

Comments
 (0)