Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Truncate ¶ added in v0.6.0
Truncate truncates a string to the given limit or first newline and adds "..." at the end
func WithReqID ¶
func WithReqID(reqID string, inner logrus.FieldLogger) logrus.FieldLogger
func WithReqIDFromCtx ¶
func WithReqIDFromCtx(ctx context.Context, inner logrus.FieldLogger) logrus.FieldLogger
WithReqIDFromCtx create logger with request id from the context, request id is set by middleware.RequestID
Types ¶
type PrefixFormatter ¶
type PrefixLogger ¶
PrefixLogger is wrapper around a logrus with an optional prefix
func NewPrefixLogger ¶
func NewPrefixLogger(prefix string) *PrefixLogger
NewPrefixLogger creates a new PrefixLogger
func (*PrefixLogger) Level ¶
func (p *PrefixLogger) Level(level string)
func (*PrefixLogger) Prefix ¶
func (l *PrefixLogger) Prefix() string
Prefix returns the prefix of the logger
Click to show internal directories.
Click to hide internal directories.