golog

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 4 Imported by: 0

README

GoLog

Introduction

This package provides logging utility for structured logging. It wraps Zap as its logger by providing convenience method to logs requests, responses and errors.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogError

func LogError(err error, ctx Context)

func LogRequest

func LogRequest(body []byte, ctx Context)

func LogResponse

func LogResponse(body []byte, status int, ctx Context)

Types

type Context

type Context interface {
	CorrelationID() string
	Source() string
	StartTime() time.Time
	Method() string
	URL() string
}

Jump to

Keyboard shortcuts

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