Skip to content

drj-sharma/glogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

docker build -t app .

docker run app

OR

Use Makefile (https://askubuntu.com/questions/161104/how-do-i-install-make)

make docker-build

make docker-run