Created
September 21, 2019 21:38
-
-
Save dhruvr/1654f478ec6cf22425a285fd1ddf93e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func ConfigureLogrus(output io.Writer) *logrus.Logger { | |
logger := logrus.New() | |
logger.SetLevel(logrus.DebugLevel) | |
logger.SetFormatter(&logrus.TextFormatter{ | |
DisableColors: false, | |
FullTimestamp: true, | |
TimestampFormat: "2006-01-02 15:04:05.000", | |
ForceColors: true, | |
DisableLevelTruncation: true, | |
}) | |
logger.SetOutput(output) | |
return logger | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment