reqlog

package
v0.0.0-...-f05d2e9 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2015 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Print

func Print(ctx context.Context, v ...interface{})

Print prefixes the request ID, if any, and calls Print on the underlying logger.

func Printf

func Printf(ctx context.Context, format string, v ...interface{})

Printf prefixes the request ID, if any, and calls Printf on the underlying logger.

func SetContext

func SetContext(ctx context.Context, key, value string) bool

SetContext adds the key-value pair to the log data stored in the provided context. It overwrites existing values and returns false if no log data is available in the context.

func SetLogger

func SetLogger(lgr *log.Logger)

SetLogger sets the underlying output logger

func WrapC

func WrapC(h goji.Handler) goji.Handler

WrapC wraps a goji.Handler to log to the provided logger after the request completes. It adds a request ID to the context for logging with other functions in this package.

Types

This section is empty.

Jump to

Keyboard shortcuts

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