slf4go_zap

package module
v0.0.0-...-b959018 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: MIT Imports: 2 Imported by: 0

README

slf4go-zap

This is a default Driver implementation for bridging slf4go and zap.

Install

slf4go-zap dependents on slf4go and zap.

go get github.com/go-eden/slf4go-zap

Usage

slf4go-zap focuses on bridging logs, you should configure zap according to your needs.

zap_driver_test.go This is a simple example of slf4go-zap:

Notice

Only support zap.SugaredLogger, so this library don't have lots of features currently.

Hope you can help me improve this library, any Pull Request will be very welcomed.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cfg *zap.Config)

Types

type ZapDriver

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

func (*ZapDriver) GetLevel

func (d *ZapDriver) GetLevel(logger string) (sl slog.Level)

func (*ZapDriver) Name

func (d *ZapDriver) Name() string

func (*ZapDriver) Print

func (d *ZapDriver) Print(l *slog.Log)

Jump to

Keyboard shortcuts

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