From 12e2e04bcfb48e543d0fb2b8f45ae071363fe54e Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 9 May 2018 19:07:25 -0700 Subject: logrus logging --- golang/cmd/fatcatd/main.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'golang/cmd') diff --git a/golang/cmd/fatcatd/main.go b/golang/cmd/fatcatd/main.go index 94455bf8..c0668ed1 100644 --- a/golang/cmd/fatcatd/main.go +++ b/golang/cmd/fatcatd/main.go @@ -2,9 +2,9 @@ package main import ( - "log" "os" + log "github.com/sirupsen/logrus" loads "github.com/go-openapi/loads" flags "github.com/jessevdk/go-flags" @@ -12,8 +12,17 @@ import ( "git.archive.org/bnewbold/fatcat/golang/restapi/operations" ) +func init() { + + // not default of stderr + log.SetOutput(os.Stdout); + +} + func main() { + log.Warn("Starting up..."); + // load embedded swagger file swaggerSpec, err := loads.Analyzed(restapi.SwaggerJSON, "") if err != nil { -- cgit v1.2.3