feat: replace logrus logger with logf

logf is a minimal logger with no dependencies. this commit should
bring down the binary size.
This commit is contained in:
Karan Sharma 2022-07-01 07:29:14 +05:30
parent 218eb0233a
commit 0f8084b13c
14 changed files with 102 additions and 114 deletions

View file

@ -1,13 +1,12 @@
package utils
import "github.com/sirupsen/logrus"
import (
"github.com/mr-karan/logf"
)
// InitLogger initializes logger.
func InitLogger() *logrus.Logger {
logger := logrus.New()
logger.SetFormatter(&logrus.TextFormatter{
FullTimestamp: true,
DisableLevelTruncation: true,
})
func InitLogger() *logf.Logger {
logger := logf.New()
logger.SetColorOutput(true)
return logger
}