zapdriver

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 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

Index

Constants

View Source
const SkipUntilTrueCaller = 4

SkipUntilTrueCaller is the skip level which prints out the actual caller instead of slf4go or slf4go-zap wrappers

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(mode, level, filename, sink string) (*zap.Logger, error)

Init set the log options for debugging.

Types

type LogModeEncoder

type LogModeEncoder func() zapcore.Encoder

type ZapDriver

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

func New

func New(config zap.Config, opts ...zap.Option) *ZapDriver

New creates the driver using the provided config wrapper

func NewWithLogger

func NewWithLogger(level zap.AtomicLevel, logger *zap.Logger) *ZapDriver

func (*ZapDriver) GetLevel

func (d *ZapDriver) GetLevel(logger string) core.Level

func (*ZapDriver) Name

func (*ZapDriver) Name() string

func (*ZapDriver) Print

func (d *ZapDriver) Print(r *core.Record)

func (*ZapDriver) Sync added in v0.17.0

func (d *ZapDriver) Sync() error

Sync flushes buffered log entries.

Jump to

Keyboard shortcuts

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