Remove superfluous output to console

This commit is contained in:
Fred Boniface 2023-08-12 09:45:35 +01:00
parent bf6b027991
commit b7c2f7a951
2 changed files with 2 additions and 6 deletions

View File

@ -3,6 +3,6 @@ WORKDIR /build
COPY . . COPY . .
RUN go build RUN go build
FROM scratch FROM alpine:latest
COPY --from=builder /build/map-dots /bin/map-dots COPY --from=builder /build/map-dots /bin/map-dots
CMD [ "/bin/map-dots", "--server" ] CMD [ "/bin/map-dots", "--server" ]

View File

@ -22,7 +22,7 @@ func Server() {
http.HandleFunc("/traccar/", handleTraccarRequest) http.HandleFunc("/traccar/", handleTraccarRequest)
http.HandleFunc("/help/", handleHelpRequest) http.HandleFunc("/help/", handleHelpRequest)
serverAddr := "localhost:8198" // Set your desired server address serverAddr := ":8198" // Set your desired server address
fmt.Printf("Starting server on http://%s\n", serverAddr) fmt.Printf("Starting server on http://%s\n", serverAddr)
log.Msg.Info("Starting server on http://" + serverAddr) log.Msg.Info("Starting server on http://" + serverAddr)
err := http.ListenAndServe(serverAddr, nil) err := http.ListenAndServe(serverAddr, nil)
@ -58,10 +58,6 @@ func handleTraccarRequest(w http.ResponseWriter, r *http.Request) {
) )
} else { } else {
log.Msg.Debug("Position data fetched") log.Msg.Debug("Position data fetched")
for _, loc := range locations {
fmt.Printf("Latitude: %.7f, Longitude: %.7f, Speed: %d, Altitude: %.4f\n",
loc.Latitude, loc.Longitude, loc.Speed, loc.Altitude)
}
} }
img := imaging.Generate(height, width, style, locations) img := imaging.Generate(height, width, style, locations)