Improved logging in avatar code

This commit is contained in:
2017-06-15 16:56:06 +02:00
parent c858a58123
commit bccee5968b
4 changed files with 25 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import (
_ "image/jpeg"
_ "image/png"
"github.com/aerogo/log"
"github.com/animenotifier/arn"
"github.com/fatih/color"
)
@ -21,6 +22,7 @@ const (
var avatarSources []AvatarSource
var avatarOutputs []AvatarOutput
var avatarLog = log.NewChannel("avatar")
// Main
func main() {
@ -29,6 +31,9 @@ func main() {
// Switch to main directory
os.Chdir("../../")
// Log
avatarLog.AddOutput(log.File("logs/avatar.log"))
// Define the avatar sources
avatarSources = []AvatarSource{
&Gravatar{