lgr

package module
v0.0.0-...-78576dd Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

README

LGR

Welcome

Installation

in your project do:

go get -u -v codeberg.org/slaxor/lgr
Usage

look at the example

More Details

go to the upstream project:

https://pkg.go.dev/go.uber.org/zap

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	zap.SugaredLogger
}

Logger is a wrapper around zap.SugaredLogger for the possibility to add own functionality

func New

func New(d, lvl string) (*Logger, error)

New takes a Filename ("stdout" and "stderr" are treated differently) and a Loglevel and returns a *lgr.Logger (a wrapper around zap.SugaredLogger)

func NewFile

func NewFile(fname, lvl string) (*Logger, error)

func NewWriter

func NewWriter(w io.Writer, lvl string) (*Logger, error)

func (*Logger) Spew

func (l *Logger) Spew(v ...interface{})

type RingBuffer

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

func NewRingBuffer

func NewRingBuffer(capacity int) *RingBuffer

func (*RingBuffer) Close

func (r *RingBuffer) Close() error

func (*RingBuffer) FreeSpace

func (r *RingBuffer) FreeSpace() int

func (*RingBuffer) IsEmpty

func (r *RingBuffer) IsEmpty() bool

func (*RingBuffer) IsFull

func (r *RingBuffer) IsFull() bool

func (*RingBuffer) Read

func (r *RingBuffer) Read(p []byte) (int, error)

func (*RingBuffer) Reset

func (r *RingBuffer) Reset()

func (*RingBuffer) Size

func (r *RingBuffer) Size() int

func (*RingBuffer) Sync

func (r *RingBuffer) Sync() error

func (*RingBuffer) Write

func (r *RingBuffer) Write(p []byte) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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