# README
Go Prettylogs
Golang structured logging library
Usage
Get the go-prettylogs library
$ go get github.com/ashokhirpara1/golang-prettylogs
package main
import (
prettylogs "github.com/ashokhirpara1/golang-prettylogs"
)
func main() {
prettylogs.Info("main function to boot up everything")
}
Expected output
{"level":"info","method":"main","msg":"main function to boot up everything","time":"2022-09-23T22:59:01+05:30"}
Measure function's execution time in logs
func functionName() {
defer prettylogs.Exit(prettylogs.Enter())
}
# Packages
No description provided by the author
# Functions
Enter logs the start time of the method.
Error accepts the string message and error It logs the error level message with method name and timestamp.
Exit mesures the execution time of the method.
Fatal accepts the method name, string message and error It logs the message and exits the program.
Info accepts the string message It logs the info level message with method name and timestamp.