Ctrl.LoggerFrom

개요[ | ]

Ctrl.LoggerFrom{}
package main

import (
	"context"

	ctrl "sigs.k8s.io/controller-runtime"
	"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

func main() {
	ctrl.SetLogger(zap.New(zap.UseDevMode(true)))
	ctx := context.Background()
	logger := ctrl.LoggerFrom(ctx)
	logger.Info("hello")
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}