logs

package
v1.11.0-RC1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 7 Imported by: 14

Documentation

Overview

Package logs provides unified logging framework for all the binaries under maya.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlushLogs

func FlushLogs()

FlushLogs flushes logs immediately.

func GlogSetter

func GlogSetter(val string) (string, error)

GlogSetter is a setter to set klog level.

func InitLogs

func InitLogs()

InitLogs initializes logs the way we want for kubernetes.

func NewLogger

func NewLogger(prefix string) *log.Logger

NewLogger creates a new log.Logger which sends logs to klog.Info.

Types

type KlogWriter

type KlogWriter struct{}

KlogWriter serves as a bridge between the standard log package and the klog package.

func (KlogWriter) Write

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

Write implements the io.Writer interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL