cert-manager: github.com/jetstack/cert-manager/pkg/logs Index | Files | Directories

package logs

import "github.com/jetstack/cert-manager/pkg/logs"

Index

Package Files

logs.go

Constants

const (
    // following analog to https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md
    ErrorLevel        = 0
    WarnLevel         = 1
    InfoLevel         = 2
    ExtendedInfoLevel = 3
    DebugLevel        = 4
    TraceLevel        = 5
)
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

var (
    Log = klogr.New().WithName("cert-manager")
)

func FlushLogs Uses

func FlushLogs()

FlushLogs flushes logs immediately.

func FromContext Uses

func FromContext(ctx context.Context, names ...string) logr.Logger

func InitLogs Uses

func InitLogs(fs *flag.FlagSet)

InitLogs initializes logs the way we want for kubernetes.

func NewContext Uses

func NewContext(ctx context.Context, l logr.Logger, names ...string) context.Context

func V Uses

func V(level int) klog.Verbose

func WithRelatedResource Uses

func WithRelatedResource(l logr.Logger, obj metav1.Object) logr.Logger

func WithRelatedResourceName Uses

func WithRelatedResourceName(l logr.Logger, name, namespace, kind string) logr.Logger

func WithResource Uses

func WithResource(l logr.Logger, obj metav1.Object) logr.Logger

type GlogWriter Uses

type GlogWriter struct{}

GlogWriter serves as a bridge between the standard log package and the glog package.

func (GlogWriter) Write Uses

func (writer GlogWriter) Write(data []byte) (n int, err error)

Write implements the io.Writer interface.

Directories

PathSynopsis
testing

Package logs imports 12 packages (graph) and is imported by 82 packages. Updated 2020-08-12. Refresh now. Tools for package owners.