Commit 1d85cca7 authored by Erick Hitter's avatar Erick Hitter
Browse files

Wrap remaining log outputs in debug check

Only "normal" output should be heartbeats and things from init/main
parent 112700cf
......@@ -179,7 +179,10 @@ func getInstanceInfo() (siteInfo, error) {
jsonRes := make([]siteInfo, 0)
if err = json.Unmarshal([]byte(raw), &jsonRes); err != nil {
logger.Println(fmt.Sprintf("%+v\n", err))
if debug {
logger.Println(fmt.Sprintf("%+v\n", err))
}
return siteInfo{}, err
}
......@@ -225,7 +228,10 @@ func getMultisiteSites() ([]site, error) {
jsonRes := make([]site, 0)
if err = json.Unmarshal([]byte(raw), &jsonRes); err != nil {
logger.Println(fmt.Sprintf("%+v\n", err))
if debug {
logger.Println(fmt.Sprintf("%+v\n", err))
}
return make([]site, 0), err
}
......@@ -267,7 +273,10 @@ func getSiteEvents(site string) ([]event, error) {
siteEvents := make([]event, 0)
if err = json.Unmarshal([]byte(raw), &siteEvents); err != nil {
logger.Println(fmt.Sprintf("%+v\n", err))
if debug {
logger.Println(fmt.Sprintf("%+v\n", err))
}
return make([]event, 0), err
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment