Skip to content

Commit 0731703

Browse files
committed
feat: update log
1 parent d4f6683 commit 0731703

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

op-service/log/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func NewLoggingMiddleware(lgr log.Logger, next http.Handler) http.Handler {
1313
ww := httputil.NewWrappedResponseWriter(w)
1414
start := time.Now()
1515
next.ServeHTTP(ww, r)
16-
lgr.Debug(
16+
lgr.Trace(
1717
"served HTTP request",
1818
"status", ww.StatusCode,
1919
"response_len", ww.ResponseLen,

op-service/signer/client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"crypto/tls"
66
"crypto/x509"
7+
"encoding/hex"
78
"fmt"
89
"math/big"
910
"net/http"
@@ -113,6 +114,6 @@ func (s *SignerClient) SignTransaction(ctx context.Context, chainId *big.Int, fr
113114
}
114115
}
115116

116-
log.Debug("signed transaction", "txHash", signed.Hash().String(), "txNonce", signed.Nonce(), "txGas", signed.Gas(), "txValue", signed.Value(), "txTo", signed.To(), "txAccessList", signed.AccessList(), "txChainId", signed.ChainId(), "txGasFeeCap", signed.GasFeeCap(), "txGasTipCap", signed.GasTipCap())
117+
log.Debug("signed transaction", "txHash", signed.Hash().String(), "txNonce", signed.Nonce(), "txGas", signed.Gas(), "txValue", signed.Value(), "txTo", signed.To(), "data", hex.EncodeToString(signed.Data()), "txChainId", signed.ChainId(), "txGasFeeCap", signed.GasFeeCap(), "txGasTipCap", signed.GasTipCap())
117118
return &signed, nil
118119
}

op-service/txmgr/txmgr.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package txmgr
22

33
import (
44
"context"
5+
"encoding/hex"
56
"errors"
67
"fmt"
78
"math/big"
@@ -171,7 +172,7 @@ func (m *SimpleTxManager) Close() {
171172
func (m *SimpleTxManager) txLogger(tx *types.Transaction, logGas bool) log.Logger {
172173
fields := []any{"tx", tx.Hash(), "nonce", tx.Nonce()}
173174
if logGas {
174-
fields = append(fields, "gasTipCap", tx.GasTipCap(), "gasFeeCap", tx.GasFeeCap(), "gasLimit", tx.Gas())
175+
fields = append(fields, "gasTipCap", tx.GasTipCap(), "gasFeeCap", tx.GasFeeCap(), "gasLimit", tx.Gas(), "data", hex.EncodeToString(tx.Data()))
175176
}
176177
if len(tx.BlobHashes()) != 0 {
177178
// log the number of blobs a tx has only if it's a blob tx

0 commit comments

Comments
 (0)