Skip to content

Instantly share code, notes, and snippets.

@rogerwelin
Created January 28, 2021 22:38
Show Gist options
  • Save rogerwelin/cb954808434fb8b3c25cf410861cb983 to your computer and use it in GitHub Desktop.
Save rogerwelin/cb954808434fb8b3c25cf410861cb983 to your computer and use it in GitHub Desktop.
package logger
import (
"log"
"os"
"github.com/fatih/color"
)
var (
Info *log.Logger
Warn *log.Logger
)
func init() {
Info = log.New(os.Stdout, color.GreenString("INFO: "), log.Ltime|log.Ldate|log.Lshortfile)
Warn = log.New(os.Stdout, color.YellowString("WARN: "), log.Ltime|log.Ldate|log.Lshortfile)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment