logging

package
v0.0.0-...-2754675 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	foundationlog.PkgLogger
}

Logger wraps other logger to provide additional functionalities.

func NewPkgLogger

func NewPkgLogger() Logger

NewPkgLogger creates a logger for use within a package. This logger automatically adds the name of the package where this function was called, not when logging.

func (Logger) WithContext

func (logger Logger) WithContext(
	ctx api.CallContext,
) *foundationlog.Logger

WithContext creates a new logger which bound to a CallContext.

TODO: don't populate the entry before the actual logging call.

Jump to

Keyboard shortcuts

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