logrusl

package
v0.0.0-...-e270f0a Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Overview

Package logrusl is an adapter to use the github.com/mandelsoft/logging library on top of github.com/sirupsen/logrus.

Examples:

logrusl.Adapter().New()
logrusl.WithWriter(....).New()
logrusl.Human().New()
logrusl.JSOM().NewLogr()
logrusl.Adapter().WithFormatter(...).NewLogrus()

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() logging.Context

Types

type Settings

type Settings struct {
	Writer    io.Writer
	Formatter logrus.Formatter
}

Settings is a composition environment to configure a logrus.Logger or a logging.Context.

func Adapter

func Adapter() Settings

func Human

func Human(padded ...bool) Settings

func JSON

func JSON() Settings

func WithFormatter

func WithFormatter(f logrus.Formatter) Settings

func WithWriter

func WithWriter(w io.Writer) Settings

func (Settings) Human

func (s Settings) Human(padded ...bool) Settings

func (Settings) JSON

func (s Settings) JSON() Settings

func (Settings) New

func (s Settings) New() logging.Context

func (Settings) NewLogr

func (s Settings) NewLogr() logr.Logger

func (Settings) NewLogrus

func (s Settings) NewLogrus() *logrus.Logger

func (Settings) WithFormatter

func (s Settings) WithFormatter(f logrus.Formatter) Settings

func (Settings) WithWriter

func (s Settings) WithWriter(w io.Writer) Settings

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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