mirror of
https://github.com/status-im/status-go.git
synced 2025-01-20 19:52:42 +00:00
c5c28cc568
Set zap.Logger as the primary logger for status-go. All geth logs are now proxied through zap.Logger. closes: #6029
21 lines
370 B
Go
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")
|
|
}
|