Categorygithub.com/GoRoadster/go-log
modulepackage
1.0.0
Repository: https://github.com/goroadster/go-log.git
Documentation: pkg.go.dev

# README

go-log

logger wrapper and formatter for logrus

install

go get github.com/GoRoadster/go-log

usage

import (
	"errors"
	"time"
	
	"github.com/GoRoadster/go-log"
)

func main() {
	path := "./"
	logPrefix := "test-log"
	logLevel := log.TRACE
	shouldSave := true

	err := log.InitLogger(path, logPrefix, logLevel, shouldSave)
	if err != nil {
		panic(err)
	}

	// simple message logging
	log.Info("starting to log")

	// log with additional params
	log.Error("some random failure", "err", errors.New("failed here"), "closing", true)
}

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author