zapx

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package zapx provides shared functions used with zap to help reduce code duplication. The GooseLogger for example takes a zap logger and turns it into an interface that is compatible with goose.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GooseLogger

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

GooseLogger provides the methods needed for a logger in the goose package. This wraps the zap logger and in some cases formats data to ensure it prints out nicely.

func NewGooseLogger

func NewGooseLogger(logger *zap.SugaredLogger) *GooseLogger

NewGooseLogger returns a new GooseLogger from a zap logger

func (*GooseLogger) Fatal

func (l *GooseLogger) Fatal(v ...interface{})

func (*GooseLogger) Fatalf

func (l *GooseLogger) Fatalf(format string, v ...interface{})

func (*GooseLogger) Print

func (l *GooseLogger) Print(v ...interface{})

func (*GooseLogger) Printf

func (l *GooseLogger) Printf(format string, v ...interface{})

func (*GooseLogger) Println

func (l *GooseLogger) Println(v ...interface{})

type LuraLogger

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

LuraLogger provides the methods needed for a logger from lura. This wraps the zap logger methods and provides all the required Lura methods.

func NewLuraLogger

func NewLuraLogger(logger *zap.SugaredLogger) *LuraLogger

NewLuraLogger returns a new LuraLogger from a zap.SugaredLogger

func (*LuraLogger) Critical

func (l *LuraLogger) Critical(v ...interface{})

func (*LuraLogger) Debug

func (l *LuraLogger) Debug(v ...interface{})

func (*LuraLogger) Error

func (l *LuraLogger) Error(v ...interface{})

func (*LuraLogger) Fatal

func (l *LuraLogger) Fatal(v ...interface{})

func (*LuraLogger) Info

func (l *LuraLogger) Info(v ...interface{})

func (*LuraLogger) Warning

func (l *LuraLogger) Warning(v ...interface{})

Jump to

Keyboard shortcuts

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