Documentation ¶
Index ¶
- Constants
- func CtxField(field string)
- func Debug(ctx context.Context, msg string)
- func Debugf(ctx context.Context, msg string, fields ...string)
- func EchoMWLogger(ignoreUrls []string) echo.MiddlewareFunc
- func Error(ctx context.Context, msg string, err error)
- func Errorf(ctx context.Context, msg string, err error, fields ...string)
- func Flush()
- func Info(ctx context.Context, msg string)
- func Infof(ctx context.Context, msg string, fields ...string)
- func SendError(ctx context.Context, err error, fields ...string)
- func Warn(ctx context.Context, msg string)
- func Warnf(ctx context.Context, msg string, fields ...string)
- func WithField(ctx context.Context, key, value string) context.Context
- func WithSentry(dsn, environment, version string) error
Constants ¶
View Source
const ( TraceID logField = "traceID" OrderUID logField = "orderUID" Handler logField = "handler" ClientID logField = "clientID" UserID logField = "userID" ItemSRID logField = "itemSRID" ItemRID logField = "itemRID" )
View Source
const IOCTL_SYNC_ERROR = "sync /dev/stdout: inappropriate ioctl for device"
Variables ¶
This section is empty.
Functions ¶
func EchoMWLogger ¶
func EchoMWLogger(ignoreUrls []string) echo.MiddlewareFunc
func SendError ¶
SendError writing error with stack trace to sentry TODO при логировании ошибок, имеют тип: errors.errorString (нужны отдельные типы, если хотим красиво) и слегка раздутый stacktrace (если передавать сюда ошибку из пакета github.com/pkg/errors, проблема исчезает)
func WithSentry ¶
WithSentry attaches sentry to logger. All Error calls will be written to sentry
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.