maykonlsf / logger

Go structured logger compatible with Stackdriver build with zap

Home Page:https://pkg.go.dev/github.com/maykonlf/logger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logger

lint

Go structured logger compatible with stackdriver build with zap

Installation

go get -u github.com/maykonlf/logger

Quick Start

log := logger.NewLoggerWithLevel(logger.JSONEncoding, logger.DebugLevel)
defer log.Sync()

log.Debug("debug log", "key", "value")
log.Info("info log", "key", "value")
log.Warn("warn log", "key", "value")
log.Error("error log", "key", "value", "err", errors.New("meu erro!!"))
log.DPanic("d-panic log", "key", "value")
log.Panic("panic log", "key", "value")
log.Fatal("fatal log", "key", "value")

Dependencies

About

Go structured logger compatible with Stackdriver build with zap

https://pkg.go.dev/github.com/maykonlf/logger

License:MIT License


Languages

Language:Go 96.6%Language:Makefile 3.4%