zap

package
v0.0.0-...-5b45b46 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package zap implements a mapper from "go.uber.org/zap"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Kind

type Kind int
const (
	DEV Kind = iota
	PROD
	CONSOLE
)

type Logger

type Logger struct {
	*zap.SugaredLogger
}

Logger is an Contextual logger wrapper over Logrus's logger.

func (Logger) Log

func (l Logger) Log(lvl log.Level, args ...interface{})

func (Logger) Output

func (l Logger) Output() io.Writer

func (Logger) Print

func (l Logger) Print(args ...interface{})

func (Logger) Printf

func (l Logger) Printf(fmt string, args ...interface{})

func (Logger) Println

func (l Logger) Println(args ...interface{})

func (Logger) SetOutput

func (l Logger) SetOutput(o io.Writer)

SetOutput will change the output of the logger. Hopefully. Once day. Right now it does nothing. TODO: Implement it. Duh.

func (Logger) With

func (l Logger) With(fields ...interface{}) log.LeveledExtended

With wraps the zap sugared logger's With-method, which returns an explicit *zap.Sugared, which can't be abstracted without a wrapper :(

func (Logger) Write

func (l Logger) Write(b []byte) (int, error)

func (Logger) Zap

func (l Logger) Zap() *zap.SugaredLogger

Jump to

Keyboard shortcuts

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