From 4dba3d6554b0ab82f5ddd02baa6af50794b5b511 Mon Sep 17 00:00:00 2001 From: zzzckck <152148891+zzzckck@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:36:49 +0800 Subject: [PATCH] faucet: fix the terminal format --- cmd/faucet/faucet.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go index 5b410b8868..6596cc5f4f 100644 --- a/cmd/faucet/faucet.go +++ b/cmd/faucet/faucet.go @@ -102,8 +102,8 @@ func weiToEtherStringF2(wei *big.Int) string { func main() { // Parse the flags and set up the logger to print everything requested flag.Parse() - log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.FromLegacyLevel(*logFlag), true))) - + log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.FromLegacyLevel(*logFlag), false))) + log.Info("faucet started") // Construct the payout tiers amounts := make([]string, *tiersFlag) for i := 0; i < *tiersFlag; i++ { @@ -535,8 +535,8 @@ func (f *faucet) apiHandler(w http.ResponseWriter, r *http.Request) { } else { if balanceMainnet.Cmp(minMainnetBalance) < 0 { f.lock.Unlock() - log.Warn("insufficient enough BNB on BSC mainnet", "address", mainnetAddr, - "balanceMainnet", balanceMainnet, "minimum mainnet BNB request", minMainnetBalance) + log.Warn("insufficient BNB on BSC mainnet", "address", mainnetAddr, + "balanceMainnet", balanceMainnet, "minMainnetBalance", minMainnetBalance) // Send an error if failed to meet the minimum balance requirement if err = sendError(wsconn, fmt.Errorf("%s, insufficient BNB on BSC mainnet(should >=%sBNB)", address.Hex(), weiToEtherStringF2(minMainnetBalance))); err != nil {