chain

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package chain is a logger chain. Useful if you want to print the log in local and send the log to third party at the same time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(logger log.Logger, loggers ...log.Logger) log.Logger

New to create new logger chain.

Types

type Chain

type Chain struct {
	// contains filtered or unexported fields
}

Chain is logger chain.

func (*Chain) Debug

func (lc *Chain) Debug(format string, args ...interface{})

Debug to print debug log.

func (*Chain) Error

func (lc *Chain) Error(format string, args ...interface{})

Error to print error log.

func (*Chain) Fatal

func (lc *Chain) Fatal(format string, args ...interface{})

Fatal to print fatal log.

func (*Chain) Info

func (lc *Chain) Info(format string, args ...interface{})

Info to print info log.

func (*Chain) Log

func (lc *Chain) Log(fields map[string]interface{})

Log to print general log. Key `level` can be used to differentiate log level.

func (*Chain) Panic

func (lc *Chain) Panic(format string, args ...interface{})

Panic to print panic log.

func (*Chain) Trace

func (lc *Chain) Trace(format string, args ...interface{})

Trace to print trace log.

func (*Chain) Warn

func (lc *Chain) Warn(format string, args ...interface{})

Warn to print warn log.

Jump to

Keyboard shortcuts

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