From 2685e4bc29096d6f94311834b920e9f49cb9b7d1 Mon Sep 17 00:00:00 2001 From: Won Jun Jang Date: Fri, 17 Feb 2017 14:35:44 -0500 Subject: [PATCH] Add compatibility test --- logger_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/logger_test.go b/logger_test.go index 71bac15b..d2c747cd 100644 --- a/logger_test.go +++ b/logger_test.go @@ -22,6 +22,8 @@ package jaeger import ( "testing" + + "github.com/uber/jaeger-client-go/log" ) func TestLogger(t *testing.T) { @@ -30,3 +32,15 @@ func TestLogger(t *testing.T) { logger.Error("Bad wolf") } } + +func TestCompatibility(t *testing.T) { + for _, logger := range []log.Logger{StdLogger, NullLogger} { + logger.Infof("Hi %s", "there") + logger.Error("Bad wolf") + } + + for _, logger := range []Logger{log.StdLogger, log.NullLogger} { + logger.Infof("Hi %s", "there") + logger.Error("Bad wolf") + } +}