Documentation ¶
Index ¶
- Constants
- Variables
- func AddFlags(opts *logsapi.LoggingConfiguration, fs *pflag.FlagSet)
- func AddFlagsNonDeprecated(opts *logsapi.LoggingConfiguration, fs *pflag.FlagSet)
- func FlushLogs()
- func FromContext(ctx context.Context, names ...string) logr.Logger
- func InitLogs()
- func NewContext(ctx context.Context, l logr.Logger, names ...string) context.Context
- func V(level int) klog.Verbose
- func ValidateAndApply(opts *logsapi.LoggingConfiguration) error
- func WithRelatedResource(l logr.Logger, obj metav1.Object) logr.Logger
- func WithRelatedResourceName(l logr.Logger, name, namespace, kind string) logr.Logger
- func WithResource(l logr.Logger, obj metav1.Object) logr.Logger
- type LogWithFormat
Constants ¶
View Source
const ( ErrorLevel = 0 WarnLevel = 1 InfoLevel = 2 ExtendedInfoLevel = 3 DebugLevel = 4 TraceLevel = 5 )
View Source
const ( ResourceNameKey = "resource_name" ResourceNamespaceKey = "resource_namespace" ResourceKindKey = "resource_kind" ResourceVersionKey = "resource_version" RelatedResourceNameKey = "related_resource_name" RelatedResourceNamespaceKey = "related_resource_namespace" RelatedResourceKindKey = "related_resource_kind" RelatedResourceVersionKey = "related_resource_version" )
Variables ¶
View Source
var Log = klog.TODO().WithName("cert-manager")
Functions ¶
func AddFlagsNonDeprecated ¶
func AddFlagsNonDeprecated(opts *logsapi.LoggingConfiguration, fs *pflag.FlagSet)
func NewContext ¶
func ValidateAndApply ¶
func ValidateAndApply(opts *logsapi.LoggingConfiguration) error
func WithRelatedResourceName ¶
Types ¶
type LogWithFormat ¶
LogWithFormat is a wrapper for logger that adds Infof method to log messages with the given format and arguments.
Used as a patch to the controller eventBroadcaster for sending non-string objects.
func WithInfof ¶
func WithInfof(l logr.Logger) *LogWithFormat
func (*LogWithFormat) Infof ¶
func (l *LogWithFormat) Infof(format string, a ...interface{})
Infof logs message with the given format and arguments.
Click to show internal directories.
Click to hide internal directories.