From a95b007ec1e4c124b3a0c1a8a29729cded09258d Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Mon, 8 Aug 2022 03:14:58 +0800 Subject: [PATCH] Use warning to log exceptions of inventory operation --- .../DaprActorsInventory/DaprActorsProductInventoryProvider.cs | 4 ++-- .../OrleansGrainsProductInventoryProvider.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/DaprActorsProductInventoryProvider.cs b/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/DaprActorsProductInventoryProvider.cs index 86ebb124..73f072fb 100644 --- a/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/DaprActorsProductInventoryProvider.cs +++ b/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/DaprActorsProductInventoryProvider.cs @@ -67,7 +67,7 @@ public class DaprActorsProductInventoryProvider : IProductInventoryProvider, ITr } catch (Exception e) { - _logger.LogError("Actor threw: {Message}", e.Message); + _logger.LogWarning("Actor threw: {Message}", e.InnerException?.Message ?? e.Message); return false; } @@ -92,7 +92,7 @@ public class DaprActorsProductInventoryProvider : IProductInventoryProvider, ITr } catch (Exception e) { - _logger.LogError("Actor threw: {Message}", e.Message); + _logger.LogWarning("Actor threw: {Message}", e.InnerException?.Message ?? e.Message); return false; } diff --git a/plugins/Inventories/OrleansGrains/src/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain/EasyAbp/EShop/Products/OrleansGrainsInventory/OrleansGrainsProductInventoryProvider.cs b/plugins/Inventories/OrleansGrains/src/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain/EasyAbp/EShop/Products/OrleansGrainsInventory/OrleansGrainsProductInventoryProvider.cs index 19a7edb2..b2b82346 100644 --- a/plugins/Inventories/OrleansGrains/src/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain/EasyAbp/EShop/Products/OrleansGrainsInventory/OrleansGrainsProductInventoryProvider.cs +++ b/plugins/Inventories/OrleansGrains/src/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain/EasyAbp/EShop/Products/OrleansGrainsInventory/OrleansGrainsProductInventoryProvider.cs @@ -65,7 +65,7 @@ public class OrleansGrainsProductInventoryProvider : IProductInventoryProvider, } catch (Exception e) { - _logger.LogError("Grain threw: {Message}", e.Message); + _logger.LogWarning("Grain threw: {Message}", e.InnerException?.Message ?? e.Message); return false; } @@ -90,7 +90,7 @@ public class OrleansGrainsProductInventoryProvider : IProductInventoryProvider, } catch (Exception e) { - _logger.LogError("Grain threw: {Message}", e.Message); + _logger.LogWarning("Grain threw: {Message}", e.InnerException?.Message ?? e.Message); return false; }