Skip to content

Commit

Permalink
Merge branch 'pc/print-line-in-log' into 'master'
Browse files Browse the repository at this point in the history
Add logrus handler to print the filename and line for better debugging

See merge request yakshaving.art/git-pull-mirror!35
  • Loading branch information
Ilya Frolov committed Aug 20, 2018
2 parents 49f3ff3 + a4bb3f3 commit 84ac812
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import (

_ "gitlab.com/yakshaving.art/git-pull-mirror/metrics"

"github.com/onrik/logrus/filename"
"github.com/sirupsen/logrus"

"gitlab.com/yakshaving.art/git-pull-mirror/config"
"gitlab.com/yakshaving.art/git-pull-mirror/github"
"gitlab.com/yakshaving.art/git-pull-mirror/server"
Expand All @@ -37,6 +39,7 @@ var (
)

func main() {
logrus.AddHook(filename.NewHook())
logrus.SetFormatter(&logrus.TextFormatter{
FullTimestamp: true,
})
Expand Down

0 comments on commit 84ac812

Please sign in to comment.