mg-transport-core/core/logger_test.go

22 lines
435 B
Go
Raw Normal View History

2019-09-18 18:02:40 +03:00
package core
import (
"testing"
"github.com/op/go-logging"
"github.com/stretchr/testify/assert"
)
func TestLogger_NewLogger(t *testing.T) {
logger := NewLogger("code", logging.DEBUG, DefaultLogFormatter())
assert.NotNil(t, logger)
}
func TestLogger_DefaultLogFormatter(t *testing.T) {
formatter := DefaultLogFormatter()
assert.NotNil(t, formatter)
assert.IsType(t, logging.MustStringFormatter(`%{message}`), formatter)
}