Documentation ¶
Overview ¶
Copyright 2023.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Options = &zap.Options{ Development: true, StacktraceLevel: zapcore.DPanicLevel, TimeEncoder: zapcore.RFC3339NanoTimeEncoder, Level: zzap.NewAtomicLevelAt(zapcore.InfoLevel), EncoderConfigOptions: []zap.EncoderConfigOption{func(ec *zapcore.EncoderConfig) { ec.CallerKey = "caller" }}, ZapOpts: []zzap.Option{zzap.AddCaller(), zzap.AddCallerSkip(1)}, }
Options stores controller-runtime (zap) log config
Functions ¶
func InitLog ¶
func InitLog()
InitLog initializes controller-runtime log (zap log) this should be called once Options have been initialized either by parsing flags or directly modifying Options.
func SetLogLevel ¶
func SetLogLevel(operatorLevel int)
SetLogLevel provides conversion from the operators LogLevel value ({0,1,2} where 2 is the most verbose) and sets the current logging level accordingly.
Types ¶
This section is empty.