status-go/logutils/logger_test.go
Patryk Osmaczko c5c28cc568 chore(logging)_: switch to zap.Logger as central logger
Set zap.Logger as the  primary logger for status-go. All geth logs are
now proxied through zap.Logger.

closes: #6029
2024-11-22 10:03:22 +01:00

21 lines
370 B
Go

package logutils
import (
"bytes"
"testing"
"github.com/stretchr/testify/require"
"go.uber.org/zap/zapcore"
)
func TestPrintOrigins(t *testing.T) {
buffer := bytes.NewBuffer(nil)
logger := defaultLogger()
logger.Core().(*Core).UpdateSyncer(zapcore.AddSync(buffer))
logger.Info("hello")
require.Contains(t, buffer.String(), "logutils/logger_test.go:17")
}