From 5590cb63c1bf53ceff964e6df7ce8b4b16a623fe Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Mon, 2 Apr 2018 16:14:46 -0400 Subject: [PATCH] Merge in go-hclog --- .../hashicorp/go-hclog/nulllogger.go | 45 +++++++++++++++++++ vendor/vendor.json | 6 +-- 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 vendor/github.com/hashicorp/go-hclog/nulllogger.go diff --git a/vendor/github.com/hashicorp/go-hclog/nulllogger.go b/vendor/github.com/hashicorp/go-hclog/nulllogger.go new file mode 100644 index 000000000..c10ce6e88 --- /dev/null +++ b/vendor/github.com/hashicorp/go-hclog/nulllogger.go @@ -0,0 +1,45 @@ +package hclog + +import ( + "log" + "io/ioutil" +) + +// NewNullLogger instantiates a Logger for which all calls +// will succeed without doing anything. +// Useful for testing purposes. +func NewNullLogger() Logger { + return &nullLogger{} +} + +type nullLogger struct{} + +func (l *nullLogger) Trace(msg string, args ...interface{}) {} + +func (l *nullLogger) Debug(msg string, args ...interface{}) {} + +func (l *nullLogger) Info(msg string, args ...interface{}) {} + +func (l *nullLogger) Warn(msg string, args ...interface{}) {} + +func (l *nullLogger) Error(msg string, args ...interface{}) {} + +func (l *nullLogger) IsTrace() bool { return false } + +func (l *nullLogger) IsDebug() bool { return false } + +func (l *nullLogger) IsInfo() bool { return false } + +func (l *nullLogger) IsWarn() bool { return false } + +func (l *nullLogger) IsError() bool { return false } + +func (l *nullLogger) With(args ...interface{}) Logger { return l } + +func (l *nullLogger) Named(name string) Logger { return l } + +func (l *nullLogger) ResetNamed(name string) Logger { return l } + +func (l *nullLogger) StandardLogger(opts *StandardLoggerOptions) *log.Logger { + return log.New(ioutil.Discard, "", log.LstdFlags) +} \ No newline at end of file diff --git a/vendor/vendor.json b/vendor/vendor.json index 0e4ce7833..86627e54e 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1087,10 +1087,10 @@ "revisionTime": "2018-02-23T19:15:17Z" }, { - "checksumSHA1": "OEBNuHhYGJwXWNyZ2i+sAiOLtDs=", + "checksumSHA1": "qhjAx0nMYBeQqRTaf7sQYpfUIq0=", "path": "github.com/hashicorp/go-hclog", - "revision": "ad26ae78d4726a0d9fd16afcdff629babc1fc661", - "revisionTime": "2018-04-02T19:56:19Z" + "revision": "69ff559dc25f3b435631604f573a5fa1efdb6433", + "revisionTime": "2018-04-02T20:04:05Z" }, { "checksumSHA1": "y+AeKVZoX0gB+DZW4Arzkb3tTVc=",