logger

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 4 Imported by: 0

README

Go-Logger

Go-Logger is a simple logging application. It leverages Uber's zap package.

Installation

go get github.com/allenakinkunle/go-logger

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ILogger

type ILogger interface {
	Info(message string)
	Error(message string)
	RequestLogger() func(next http.Handler) http.Handler
}

type MockLogger

type MockLogger struct{}

func NewMockLogger

func NewMockLogger() MockLogger

func (MockLogger) Error

func (MockLogger) Error(message string)

func (MockLogger) Info

func (MockLogger) Info(message string)

func (MockLogger) RequestLogger

func (MockLogger) RequestLogger() func(next http.Handler) http.Handler

type ZapLogger

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

func NewZapLogger

func NewZapLogger(logger *zap.Logger) *ZapLogger

func (*ZapLogger) Error

func (z *ZapLogger) Error(message string)

func (*ZapLogger) Info

func (z *ZapLogger) Info(message string)

func (*ZapLogger) RequestLogger

func (z *ZapLogger) RequestLogger() func(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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