logging

package
v0.0.0-...-6c789bd Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package logging provides logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) *zap.Logger

FromContext extracts *zap.Logger from a given context.Context and returns it.

func NewLogger

func NewLogger(cfg config.Log, opts ...zap.Option) (*zap.Logger, error)

NewLogger returns *zap.Logger initialized by provided log level and []zap.Option.

func WithContext

func WithContext(ctx context.Context, logger *zap.Logger) context.Context

WithContext returns a context.Context with *zap.Logger as a context value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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