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:
parent
218eb0233a
commit
0f8084b13c
14 changed files with 102 additions and 114 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue