MCPcopy
hub / github.com/op/go-logging / NewBackendFormatter

Function NewBackendFormatter

format.go:404–406  ·  view source on GitHub ↗

NewBackendFormatter creates a new backend which makes all records that passes through it beeing formatted by the specific formatter.

(b Backend, f Formatter)

Source from the content-addressed store, hash-verified

402// NewBackendFormatter creates a new backend which makes all records that
403// passes through it beeing formatted by the specific formatter.
404func NewBackendFormatter(b Backend, f Formatter) Backend {
405 return &backendFormatter{b, f}
406}
407
408// Log implements the Log function required by the Backend interface.
409func (bf *backendFormatter) Log(level Level, calldepth int, r *Record) error {

Callers 2

TestBackendFormatterFunction · 0.85
ExampleFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestBackendFormatterFunction · 0.68
ExampleFunction · 0.68