slzl

package module
v0.0.0-...-1e382cd Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: MIT Imports: 2 Imported by: 0

README

slzl - sl Zerolog Implementation

A Zerolog implementation of sl.

Usage

import (
    "github.com/hashamali/slzl"
    "github.com/rs/zerolog"
)

func main() {
    l := slzl.New(zerolog.New(os.Stdout))
    l.Info("Ready!")
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLevel

func SetLevel(level int)

SetLevel will set the global Zerolog level.

Types

type Zerolog

type Zerolog struct {
	Logger zerolog.Logger
}

Zerolog is a Zerolog implementation of sl.Log.

func New

func New(logger zerolog.Logger) *Zerolog

New will create a new Zerolog.

func (Zerolog) Error

func (l Zerolog) Error(message string)

Error logs an error.

func (Zerolog) Errorf

func (l Zerolog) Errorf(format string, v ...interface{})

Errorf logs an error for a format.

func (Zerolog) Errorfw

func (l Zerolog) Errorfw(metadata interface{}, format string, v ...interface{})

Errorfw logs an error with metadata for a format.

func (Zerolog) Errorw

func (l Zerolog) Errorw(metadata interface{}, message string)

Errorw logs an error with metadata.

func (Zerolog) Info

func (l Zerolog) Info(message string)

Info logs info.

func (Zerolog) Infof

func (l Zerolog) Infof(format string, v ...interface{})

Infof logs info for a format.

func (Zerolog) Infofw

func (l Zerolog) Infofw(metadata interface{}, format string, v ...interface{})

Infofw logs info with metadata for a format.

func (Zerolog) Infow

func (l Zerolog) Infow(metadata interface{}, message string)

Infow logs info with metadata.

func (Zerolog) V

func (l Zerolog) V(verbosity int) bool

V handles verbosity.

func (Zerolog) With

func (l Zerolog) With(metadata interface{}) sl.Log

With adds metadata to the logger's context.

Jump to

Keyboard shortcuts

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