https://github.com/drj-sharma/glogger
A logging library for Golang, simple and easy to use compatible with the standard library logger.
https://github.com/drj-sharma/glogger
go golang library logger
Last synced: 6 months ago
JSON representation
A logging library for Golang, simple and easy to use compatible with the standard library logger.
- Host: GitHub
- URL: https://github.com/drj-sharma/glogger
- Owner: drj-sharma
- Created: 2022-11-14T13:07:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-06T03:17:43.000Z (over 3 years ago)
- Last Synced: 2026-01-12T02:45:10.517Z (6 months ago)
- Topics: go, golang, library, logger
- Language: Go
- Homepage: https://github.com/drj-sharma/glogger
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Glogger: A logging library for Golang, simple and easy to use compatible with the standard library logger.
## Installation & testing
Use below as package to install glogger in your Go project
RUN
```
go get github.com/drj-sharma/glogger@latest
```
and use below package as logger, see example for more details
```
github.com/drj-sharma/glogger
```
example
```bash
import (
log "github.com/drj-sharma/glogger"
)
var (
logging = log.Logger{}
logger = logging.GetLogger()
)
func main() {
logger.Info("This is info logger")
logger.Debug("This is debug logger")
logger.Fatal("This is fatal logger")
// example log
"[time] - LOGGER_LEVEL - LOG_MSG"
}
```
---
Easiest way to test this library by using Docker
```bash
docker build -t app .
docker run app
```
OR
Use Makefile (https://askubuntu.com/questions/161104/how-do-i-install-make)
``` bash
make docker-build
make docker-run