File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ type Faucet struct {
3838 sendAmount std.Coins // for fast lookup
3939}
4040
41+ var noopLogger = slog .New (slog .NewTextHandler (io .Discard , nil ))
42+
4143// NewFaucet creates a new instance of the Gno faucet server
4244func NewFaucet (
4345 estimator estimate.Estimator ,
@@ -47,7 +49,7 @@ func NewFaucet(
4749 f := & Faucet {
4850 estimator : estimator ,
4951 client : client ,
50- logger : slog . New ( slog . NewTextHandler ( io . Discard , nil )) ,
52+ logger : noopLogger ,
5153 config : config .DefaultConfig (),
5254 prepareTxMsgFn : defaultPrepareTxMessage ,
5355 middlewares : nil , // no middlewares by default
Original file line number Diff line number Diff line change 11package faucet
22
33import (
4- "io"
5- "log/slog"
64 "net/http"
75 "testing"
86
@@ -136,7 +134,7 @@ func TestFaucet_NewFaucet(t *testing.T) {
136134 & mockEstimator {},
137135 & mockClient {},
138136 WithConfig (config .DefaultConfig ()),
139- WithLogger (slog . New ( slog . NewTextHandler ( io . Discard , nil )) ),
137+ WithLogger (noopLogger ),
140138 )
141139
142140 assert .NotNil (t , f )
You can’t perform that action at this time.
0 commit comments