From 1a33965c569c3b9ba568410270fbda79dd9fff76 Mon Sep 17 00:00:00 2001 From: lurais <107600021+lurais@users.noreply.github.com> Date: Wed, 9 Aug 2023 16:38:34 +0800 Subject: [PATCH] feat(log): optimize error log output for Wallet.java (#5366) --- framework/src/main/java/org/tron/core/Wallet.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/framework/src/main/java/org/tron/core/Wallet.java b/framework/src/main/java/org/tron/core/Wallet.java index b866ab54001..3560a7032bc 100755 --- a/framework/src/main/java/org/tron/core/Wallet.java +++ b/framework/src/main/java/org/tron/core/Wallet.java @@ -2058,7 +2058,7 @@ public IncrementalMerkleTree getMerkleTreeOfBlock(long blockNum) throws ZksnarkE .parseFrom(chainBaseManager.getMerkleTreeIndexStore().get(blockNum)); } } catch (Exception ex) { - logger.error(ex.getMessage()); + logger.error("GetMerkleTreeOfBlock failed, blockNum:{}", blockNum, ex); } return null; @@ -4304,7 +4304,7 @@ public long getEnergyFee(long timestamp) { return energyFee; } catch (Exception e) { - logger.error("getEnergyFee timestamp={} failed, error is {}", timestamp, e.getMessage()); + logger.error("GetEnergyFee timestamp={} failed", timestamp, e); return getEnergyFee(); } } @@ -4313,7 +4313,7 @@ public String getEnergyPrices() { try { return chainBaseManager.getDynamicPropertiesStore().getEnergyPriceHistory(); } catch (Exception e) { - logger.error("getEnergyPrices failed, error is {}", e.getMessage()); + logger.error("GetEnergyPrices failed", e); } return null; @@ -4323,7 +4323,7 @@ public String getBandwidthPrices() { try { return chainBaseManager.getDynamicPropertiesStore().getBandwidthPriceHistory(); } catch (Exception e) { - logger.error("getBandwidthPrices failed, error is {}", e.getMessage()); + logger.error("GetBandwidthPrices failed", e); } return null; @@ -4444,7 +4444,7 @@ public String getMemoFeePrices() { try { return chainBaseManager.getDynamicPropertiesStore().getMemoFeeHistory(); } catch (Exception e) { - logger.error("getMemoFeePrices failed, error is {}", e.getMessage()); + logger.error("GetMemoFeePrices failed", e); } return null; }