Skip to content

Commit

Permalink
Merge pull request #17 from vrenaville/args_log
Browse files Browse the repository at this point in the history
feat: add args in json log
  • Loading branch information
vrenaville authored Aug 17, 2022
2 parents da6ee50 + 2a354e2 commit a8c29aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/kwkhtmltopdf_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"bytes"
"strings"
"errors"
"io"
"time"
Expand Down Expand Up @@ -91,8 +92,6 @@ func handler(w http.ResponseWriter, r *http.Request) {
} else {
addr = addr_array[0]
}
log.Info().Str("From",addr).Msg("Request Received")

if r.Method != http.MethodPost {
httpError(w, errors.New("http method not allowed: "+r.Method), http.StatusMethodNotAllowed, addr)
return
Expand Down Expand Up @@ -169,6 +168,7 @@ func handler(w http.ResponseWriter, r *http.Request) {
if debug_enabled != "" {
log.Info().Msg("starting")
}
log.Info().Str("From",addr).Str("Args",strings.Join(args, " ")).Msg("Request Received")
// Create output file
outputfile := filepath.Join(tmpdir, "output.pdf")
if !(docOutput) {
Expand Down

0 comments on commit a8c29aa

Please sign in to comment.