Skip to content

mldev-ai/gologger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gologger

Build Status Go Report Card

Gologger is simple scalable logger for any type of application logging. Ability to have different log levels with corresponding environment.

# To install in your project
go get github.com/mldev-ai/gologger

Easy to Use

package main

import "github.com/mldev-ai/gologger"

const LOG_LEVEL=3

type SampleUser struct{
    Name    string
    Age     int
}

func main() {
    
    myLogger := gologger.NewGoLogger(gologger.Config{LogLevel: 1}).SetScope("main")
    myLogger.Info("This is some log!!!")
    myLogger.Info(1)
    
    user := SampleUser{Name:"Rajat Gupta", Age:22}
    
    // Print's formatted struct
    mylogger.Info(user)
    
}