logging

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: ISC Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(ctx context.Context, message string)

Debug logs a new message with debug level.

func Error

func Error(ctx context.Context, message, code string)

Error logs a message and code with error level.

func ErrorWithStack

func ErrorWithStack(ctx context.Context, err error)

ErrorWithStack logs a message of error and all previous errors.

func ErrorWithStackWithoutRequestID

func ErrorWithStackWithoutRequestID(ctx context.Context, err error)

ErrorWithStackWithoutRequestID logs a message of error without requestID

func Fatal

func Fatal(ctx context.Context, message, code string)

Fatal logs a new message and code with fatal level.

func FatalErrorWithStack

func FatalErrorWithStack(ctx context.Context, err error, code string)

FatalErrorWithStack logs a message of error and all previous errors and call Fatal .

func GenerateRequestID

func GenerateRequestID() string

GenerateRequestID generates unique request_id

func HTTPCtxValuesMiddleware

func HTTPCtxValuesMiddleware(next http.Handler) http.Handler

HTTPCtxValuesMiddleware ->

func HTTPRequestMiddleware

func HTTPRequestMiddleware() func(next http.Handler) http.Handler

HTTPRequestMiddleware ->

func Info

func Info(ctx context.Context, message string)

Info logs a new message with info level.

func Panic

func Panic(ctx context.Context, message, code string)

Panic logs a new message and code with panic level.

func SetDebugLevel

func SetDebugLevel()

SetDebugLevel sets logger with debug level

func SetDisabled

func SetDisabled()

SetDisabled disable logger. Be carefull fatal and panic dont stop application.

func SetFatalLevel

func SetFatalLevel()

SetFatalLevel sets logger with fatal level.

func Warn

func Warn(ctx context.Context, message string)

Warn logs a new message with warn level.

Types

This section is empty.

Jump to

Keyboard shortcuts

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