always use logger

This commit is contained in:
Andrea Spacca
2021-07-07 21:03:54 +02:00
parent 811679f8fb
commit d9198e78db
3 changed files with 54 additions and 56 deletions

View File

@ -30,7 +30,6 @@ import (
"fmt"
"io"
"log"
"net/http"
"time"
@ -58,7 +57,7 @@ func (s *Server) scanHandler(w http.ResponseWriter, r *http.Request) {
abort := make(chan bool)
response, err := c.ScanStream(reader, abort)
if err != nil {
log.Printf("%s", err.Error())
s.logger.Printf("%s", err.Error())
http.Error(w, err.Error(), 500)
return
}