logger

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package logger provides access to an implementation of v23/logger.Logging for use within a runtime implementation. There is pre-created "global" logger and the ability to create new loggers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlreadyConfiguredError

func IsAlreadyConfiguredError(err error) bool

IsAlreadyConfiguredError returns true if the err parameter indicates the the logger has already been configured.

Types

type ManagedLogger

type ManagedLogger interface {
	// Implement logging.Logging without referring to it.
	Info(args ...interface{})
	Infof(format string, args ...interface{})
	InfoDepth(depth int, args ...interface{})
	InfoStack(all bool)
	Error(args ...interface{})
	ErrorDepth(depth int, args ...interface{})
	Errorf(format string, args ...interface{})
	Fatal(args ...interface{})
	FatalDepth(depth int, args ...interface{})
	Fatalf(format string, args ...interface{})
	Panic(args ...interface{})
	PanicDepth(depth int, args ...interface{})
	Panicf(format string, args ...interface{})
	V(level int) bool
	VDepth(depth int, level int) bool
	VI(level int) interface {
		Info(args ...interface{})
		Infof(format string, args ...interface{})
		InfoDepth(depth int, args ...interface{})
		InfoStack(all bool)
	}
	VIDepth(depth int, level int) interface {
		Info(args ...interface{})
		Infof(format string, args ...interface{})
		InfoDepth(depth int, args ...interface{})
		InfoStack(all bool)
	}
	FlushLog()

	// Implement x/ref/internal.ManagedLog without referring to it.
	LogDir() string
	Stats() (Info, Error struct{ Lines, Bytes int64 })
	ConfigureFromFlags(opts ...vlog.LoggingOpts) error
	ConfigureFromArgs(opts ...vlog.LoggingOpts) error
	ExplicitlySetFlags() map[string]string
}

func Global

func Global() ManagedLogger

Global returns the global logger.

func NewLogger

func NewLogger(name string) ManagedLogger

NewLogger creates a new logger with the supplied name.

Jump to

Keyboard shortcuts

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