Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Removed colored logging
Browse files Browse the repository at this point in the history
  • Loading branch information
fkaleo committed Jan 31, 2020
1 parent 001eef8 commit d979e98
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions api/middleware/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,7 @@ func Logger() macaron.Handler {
}
}

log.Println(colorLog(rw.Status(), content.String()))
}
}

func colorLog(statusCode int, log string) string {
if statusCode >= 200 && statusCode <= 202 {
return fmt.Sprintf("\033[1;32m%s\033[0m", log)
} else if statusCode >= 300 {
return fmt.Sprintf("\033[1;31m%s\033[0m", log)
} else {
return log
log.Println(content.String())
}
}

Expand Down

0 comments on commit d979e98

Please sign in to comment.