log.go 322 B

123456789101112131415161718
  1. package main
  2. import (
  3. "github.com/sirupsen/logrus"
  4. "log"
  5. )
  6. func setupLogs() *logrus.Logger {
  7. // Initialize logrus with standard settings
  8. logrus.SetFormatter(&logrus.TextFormatter{
  9. FullTimestamp: true,
  10. })
  11. logrus.SetLevel(logrus.InfoLevel)
  12. log.SetOutput(logrus.StandardLogger().Writer())
  13. return logrus.New()
  14. }