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.
- Host: GitHub
- URL: https://github.com/devfacet/zlog
- Owner: devfacet
- License: mit
- Created: 2022-02-15T01:59:33.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-05T23:32:24.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T00:35:56.844Z (about 2 years ago)
- Language: Makefile
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
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