An open API service indexing awesome lists of open source software.

https://github.com/devfacet/zlog

A Golang library that provides abstraction layer for zerolog logging library.
https://github.com/devfacet/zlog

Last synced: 11 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# zlog

[![Godoc][doc-image]][doc-url] [![Release][release-image]][release-url] [![Build][build-image]][build-url]

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

## Usage

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

// or

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

## Test

```shell
# 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

```shell
# 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](CONTRIBUTING.md)

## License

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

[doc-url]: https://pkg.go.dev/github.com/devfacet/zlog
[doc-image]: https://pkg.go.dev/badge/github.com/devfacet/zlog

[release-url]: https://github.com/devfacet/zlog/releases/latest
[release-image]: https://img.shields.io/github/release/devfacet/zlog.svg?style=flat-square

[build-url]: https://github.com/devfacet/zlog/actions/workflows/test.yaml
[build-image]: https://github.com/devfacet/zlog/actions/workflows/test.yaml/badge.svg