Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alfarih31/nb-go-logger
Noob Logger
https://github.com/alfarih31/nb-go-logger
Last synced: 8 days ago
JSON representation
Noob Logger
- Host: GitHub
- URL: https://github.com/alfarih31/nb-go-logger
- Owner: alfarih31
- License: mit
- Created: 2021-12-27T07:34:00.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-06T03:27:33.000Z (almost 3 years ago)
- Last Synced: 2024-05-16T23:55:19.119Z (6 months ago)
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Noob-Logger
[![Go Reference](https://pkg.go.dev/badge/github.com/alfarih31/nb-go-logger.svg)](https://pkg.go.dev/github.com/alfarih31/nb-go-logger)
![GitHub go.mod Go version (subdirectory of monorepo)](https://img.shields.io/github/go-mod/go-version/alfarih31/nb-go-logger?style=flat-square)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/alfarih31/nb-go-logger?style=flat-square)Noob Logger is a boiler plate for logging. It has features, such:
- Read log config from ENV
- Logger naming for distinguish where the log came fromNoob Logger use [Logger v1.8.1](github.com/sirupsen/logrus) as logging backend. Thanks to [*godotenv*](github.com/joho/godotenv)**
## Contents
- [Noob-Logger](#Noob-Logger)
- [Installation](#Installation)
- [Quick Start & Usage](#Quick)## Installation
To install this package, you need to install Go (**version 1.17+ is required**) & initiate your Go workspace first.
1. After you initiate your workspace then you can install this package with below command.
```shell
go get -u github.com/alfarih31/nb-go-logger
```2. Import it in your code
```go
import "github.com/alfarih31/nb-go-logger"
```## Quick Start & Usage
Logger will read following ENV:
| Key | Description | Value |
|----|----|----|
| LOG_LEVEL | Filtering log based on level | String. Values: `debug`, `error`, `info`, `warn` |
| LOG_FORMAT | Formatting log | String. Values: `console`, `json` |
| | | |## Contributors ##
- Alfarih Faza
## License
This project is licensed under the - see the [LICENSE.md](LICENSE.md) file for details