logger

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

Logger

License Release

Logger is a go package that provides a simple and easy to use logging interface. It is designed to be used in a variety of applications and provides a simple way to log messages.


Quick Start

go get github.com/RevittConsulting/logger

Features

  • Simple and easy to use
  • Get observed logs for testing

Contributing

Found a bug or want to suggest a feature? Feel free to create an issue or make a pull request.


Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorLevel

func ErrorLevel() zapcore.Level

ErrorLevel returns zapcore error level

func GetObservedLogs

func GetObservedLogs() *observer.ObservedLogs

GetObservedLogs returns observed logs for testing purposes

Types

type Zaplog

type Zaplog struct {
	*zap.Logger
}

func Log

func Log() *Zaplog

Log is invoking Zap Logger function

func (*Zaplog) DebugErr

func (z *Zaplog) DebugErr(e error, fields ...zapcore.Field) *Zaplog

DebugErr is invoking Zap Logger function with error message and fields and log level Debug

func (*Zaplog) ErrorErr

func (z *Zaplog) ErrorErr(e error, fields ...zapcore.Field) *Zaplog

ErrorErr is invoking Zap Logger function with error message and fields and log level Error

func (*Zaplog) InfoErr

func (z *Zaplog) InfoErr(e error, fields ...zapcore.Field) *Zaplog

InfoErr is invoking Zap Logger function with error message and fields and log level Info

func (*Zaplog) PanicErr

func (z *Zaplog) PanicErr(e error, fields ...zapcore.Field) *Zaplog

PanicErr is invoking Zap Logger function with error message and fields and log level Panic

func (*Zaplog) WarnErr

func (z *Zaplog) WarnErr(e error, fields ...zapcore.Field) *Zaplog

WarnErr is invoking Zap Logger function with error message and fields and log level Warn

Jump to

Keyboard shortcuts

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