Skip to content

Commit

Permalink
accept a --quiet option to disable full request logging in http-server
Browse files Browse the repository at this point in the history
Closes #926
  • Loading branch information
ashinn committed May 29, 2024
1 parent 5350d04 commit 390122a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/chibi/net/http-server.scm
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@
(make-request command (car ls) (cadr ls) in out sock addr))))
(cond
(request
(log-info `(request: ,command ,(car ls) ,(cadr ls)
,(request-headers request)))
(if (not (conf-get cfg 'quiet?))
(log-info `(request: ,command ,(car ls) ,(cadr ls)
,(request-headers request))))
(protect (exn
(else
(log-error "internal error: " exn)
Expand Down Expand Up @@ -550,7 +551,8 @@
(@
((port integer)
(doc-root string)
(verbose? boolean (#\v "verbose"))))
(verbose? boolean (#\v "verbose"))
(quiet? boolean (#\q "quiet"))))
,run-app))

(define (main args) (run-application app-spec))

0 comments on commit 390122a

Please sign in to comment.