zlog

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: MIT Imports: 3 Imported by: 0

README

zlog

Godoc Release Build

A Golang library that provides abstraction layer for zerolog logging library.

Usage

logger := zlog.Logger("info", "console", "stdout", "UTC")
logger.Info().Strs("foo", "bar").Msg("baz")

// or

zlog.DefaultLogger().Info().Strs("foo", "bar").Msg("baz")

Test

# Test everything:
make test

# For BDD development:
# It will open a new browser window. Make sure:
#   1. There is no errors on the terminal window.
#   2. There is no other open GoConvey page.
make test-ui

# Benchmarks
make test-benchmarks

Release

# Update and commit CHANGELOG.md first (i.e. git add CHANGELOG.md && git commit -m "v1.0.0").
# Set GIT_TAG using semver (i.e. GIT_TAG=v1.0.0)
make release GIT_TAG=

Contributing

See CONTRIBUTING.md

License

Licensed under The MIT License (MIT)
For the full copyright and license information, please view the LICENSE.txt file.

Documentation

Overview

Package zlog provides abstraction layer for zerolog logging library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLogger

func DefaultLogger() *zerolog.Logger

DefaultLogger returns the default logger.

func Logger

func Logger(level, format, output, location string) *zerolog.Logger

Logger returns a new logger by the given arguments.

func SetDefaultLogger

func SetDefaultLogger(l *zerolog.Logger)

SetDefaultLogger sets the default logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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