2 Copyright 2018 The Kubernetes Authors.
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
20 "github.com/go-logr/logr"
23 // NB: this is the same as the null logger logr/testing,
24 // but avoids accidentally adding the testing flags to
27 // NullLogger is a logr.Logger that does nothing.
28 type NullLogger struct{}
30 var _ logr.Logger = NullLogger{}
32 // Info implements logr.InfoLogger
33 func (NullLogger) Info(_ string, _ ...interface{}) {
37 // Enabled implements logr.InfoLogger
38 func (NullLogger) Enabled() bool {
42 // Error implements logr.Logger
43 func (NullLogger) Error(_ error, _ string, _ ...interface{}) {
47 // V implements logr.Logger
48 func (log NullLogger) V(_ int) logr.InfoLogger {
52 // WithName implements logr.Logger
53 func (log NullLogger) WithName(_ string) logr.Logger {
57 // WithValues implements logr.Logger
58 func (log NullLogger) WithValues(_ ...interface{}) logr.Logger {