Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
Logger fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien Herfray committed Oct 3, 2015
1 parent facbc51 commit 7e8bcae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Logger struct {

// NewLogger returns a new Logger instance
func NewLogger() *Logger {
return &Logger{log.New(os.Stdout, "[Zest] ", 0)}
return &Logger{log.New(os.Stdout, "\n[Zest] ", 0)}
}

func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
Expand All @@ -40,7 +40,7 @@ func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.Ha
statusCode := res.Status()
statusColor := colorForStatus(statusCode)

l.Printf("%v | %s %3d %s | %v | %s | %s %s %s %s",
l.Printf("%v | %s %3d %s | %v | %s | %s %s %s %s\n",
end.Format("2006/01/02 - 15:04:05"),
statusColor, statusCode, reset,
latency,
Expand Down

0 comments on commit 7e8bcae

Please sign in to comment.