Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/savsgio/go-logger
Fast, lightweight, customizable and structured logger for Go.
https://github.com/savsgio/go-logger
customizable fast go golang lightweight logger structured-logging
Last synced: about 2 months ago
JSON representation
Fast, lightweight, customizable and structured logger for Go.
- Host: GitHub
- URL: https://github.com/savsgio/go-logger
- Owner: savsgio
- License: apache-2.0
- Created: 2019-01-08T13:43:11.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-04T09:36:36.000Z (6 months ago)
- Last Synced: 2024-10-31T20:24:18.308Z (2 months ago)
- Topics: customizable, fast, go, golang, lightweight, logger, structured-logging
- Language: Go
- Homepage:
- Size: 121 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-logger
[![Test status](https://github.com/savsgio/go-logger/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/savsgio/go-logger/actions?workflow=test)
[![Coverage Status](https://coveralls.io/repos/github/savsgio/go-logger/badge.svg?branch=master)](https://coveralls.io/github/savsgio/go-logger?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/savsgio/go-logger/v4)](https://goreportcard.com/report/github.com/savsgio/go-logger/v4)
[![GoDev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/savsgio/go-logger/v4)
[![GitHub release](https://img.shields.io/github/release/savsgio/go-logger.svg)](https://github.com/savsgio/go-logger/releases)Fast, lightweight, customizable and structured logger for Go.
## Install
```bash
go get github.com/savsgio/go-logger/v4
```## Supported Go versions:
- 1.22.x
- 1.21.x,
- 1.20.x
- 1.19.x
- 1.18.x
- 1.17.x## Levels:
| Level | Code (constant) | Value (str) |
| ------- | --------------- | ----------------- |
| Print | logger.PRINT | |
| Panic | logger.PANIC | panic / PANIC |
| Fatal | logger.FATAL | fatal / FATAL |
| Error | logger.ERROR | error / ERROR |
| Warning | logger.WARNING | warning / WARNING |
| Info | logger.INFO | info / INFO |
| Debug | logger.DEBUG | debug / DEBUG |
| Trace | logger.TRACE | trace / TRACE |**NOTE:** _The default level of standard logger is **INFO**._
## Encoders:
- Text
- JSON
- Custom (your own encoder).**NOTE:** _The default encoder of standard logger is **text**._
## Contributing
**Feel free to contribute it or fork me...** :wink: