logging

package
v0.0.3-0...-d907587 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(msg string)

Error logs an error level message with standard fields

func ErrorLogger

func ErrorLogger() (basicLogger *log.Logger, dispose func())

ErrorLogger creates a logger that can plug in to an HTTP server

func ErrorWithRequestID

func ErrorWithRequestID(msg, correlationID string)

ErrorWithRequestID logs an error level message with standard fields and request_id

func Fatal

func Fatal(msg string)

Fatal logs an fatal level message with standard fields

func FatalWithRequestID

func FatalWithRequestID(msg, correlationID string)

FatalWithRequestID logs a fatal level message with standard fields and request_id

func Info

func Info(msg string)

Info logs an info level message with standard fields

func InfoWithRequestID

func InfoWithRequestID(msg, correlationID string)

InfoWithRequestID logs an info level message with standard fields and request_id

func LogHTTPRequest

func LogHTTPRequest(req *http.Request)

LogHTTPRequest logs an info message with standard fields and extract HTTP specific data from the request

func LogHTTPResponse

func LogHTTPResponse(res *http.Response)

LogHTTPResponse logs an info message with standard fields and extract HTTP specific data from the response

func SetStandardFields

func SetStandardFields(service, version string)

SetStandardFields sets up the service name, version, hostname and pid fields

func UsePrettyPrint

func UsePrettyPrint()

UsePrettyPrint tells the logger to print in human readable format

func Warn

func Warn(msg string)

Warn logs an warn level message with standard fields

func WarnLogger

func WarnLogger() (basicLogger *log.Logger, dispose func())

WarnLogger creates a logger that can plug in to an HTTP server

func WarnWithRequestID

func WarnWithRequestID(msg, correlationID string)

WarnWithRequestID logs a warn level message with standard fields and request_id

Types

This section is empty.

Jump to

Keyboard shortcuts

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