|
|
@@ -12,7 +12,7 @@
|
|
|
// See the License for the specific language governing permissions and
|
|
|
// limitations under the License.
|
|
|
|
|
|
-package logger_test
|
|
|
+package logutil_test
|
|
|
|
|
|
import (
|
|
|
"bytes"
|
|
|
@@ -20,7 +20,7 @@ import (
|
|
|
"strings"
|
|
|
"testing"
|
|
|
|
|
|
- "github.com/coreos/etcd/pkg/logger"
|
|
|
+ "github.com/coreos/etcd/pkg/logutil"
|
|
|
|
|
|
"google.golang.org/grpc/grpclog"
|
|
|
)
|
|
|
@@ -28,7 +28,7 @@ import (
|
|
|
func TestLogger(t *testing.T) {
|
|
|
buf := new(bytes.Buffer)
|
|
|
|
|
|
- l := logger.New(grpclog.NewLoggerV2WithVerbosity(buf, buf, buf, 10))
|
|
|
+ l := logutil.NewLogger(grpclog.NewLoggerV2WithVerbosity(buf, buf, buf, 10))
|
|
|
l.Infof("hello world!")
|
|
|
if !strings.Contains(buf.String(), "hello world!") {
|
|
|
t.Fatalf("expected 'hello world!', got %q", buf.String())
|
|
|
@@ -45,7 +45,7 @@ func TestLogger(t *testing.T) {
|
|
|
}
|
|
|
buf.Reset()
|
|
|
|
|
|
- l = logger.New(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
|
|
|
+ l = logutil.NewLogger(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
|
|
|
l.Infof("ignore this")
|
|
|
if len(buf.Bytes()) > 0 {
|
|
|
t.Fatalf("unexpected logs %q", buf.String())
|