log

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: GPL-3.0 Imports: 11 Imported by: 1 module, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package log is bp-go-lib's log middleware.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogicLoggerBuilder added in v0.0.2

func NewLogicLoggerBuilder() (lg *logicLoggerBuilder)

NewLogicLoggerBuilder generate a logicLoggerBuilder.

Types

type FieldMap

type FieldMap map[fieldKey]string

FieldMap allows customization of the key names for default fields.

type LoggerBuilder added in v0.1.0

type LoggerBuilder interface {
	Build() *logrus.Entry
	AddHook(hook logrus.Hook)
}

type LogicLoggerBuilder added in v0.1.0

type LogicLoggerBuilder interface {
	SetJobId(jobId string) *logicLoggerBuilder
	SetTraceId(jobId string) *logicLoggerBuilder
	SetUserId(jobId string) *logicLoggerBuilder
}

type LogicLoggerFormatter

type LogicLoggerFormatter struct {
	// TimestampFormat sets the format used for marshaling timestamps.
	TimestampFormat string
}

LogicLoggerFormatter formats logs into parsable json

func (*LogicLoggerFormatter) Format

func (f *LogicLoggerFormatter) Format(entry *logrus.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

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