tiny_httpd: use ?enable_logging

This commit is contained in:
Simon Cruanes 2025-05-05 10:10:19 -04:00
parent d9307e4c2c
commit 4e0a7c0393
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
2 changed files with 6 additions and 5 deletions

View file

@ -259,10 +259,10 @@ open struct
slice.len <- 0
end
let create ?(masksigpipe = not Sys.win32) ?max_connections ?max_buf_pool_size
?(timeout = 0.0) ?buf_size ?(get_time_s = Unix.gettimeofday)
?(addr = "127.0.0.1") ?(port = 8080) ?sock ?middlewares ~new_thread () :
TH.Server.t =
let create ?enable_logging ?(masksigpipe = not Sys.win32) ?max_connections
?max_buf_pool_size ?(timeout = 0.0) ?buf_size
?(get_time_s = Unix.gettimeofday) ?(addr = "127.0.0.1") ?(port = 8080) ?sock
?middlewares ~new_thread () : TH.Server.t =
let max_connections = get_max_connection_ ?max_connections () in
let max_pool_size =
match max_buf_pool_size with
@ -300,4 +300,4 @@ let create ?(masksigpipe = not Sys.win32) ?max_connections ?max_buf_pool_size
let tcp_server () = tcp_server_builder
end in
let backend = (module B : TH.Server.IO_BACKEND) in
TH.Server.create_from ?buf_size ?middlewares ~backend ()
TH.Server.create_from ?enable_logging ?buf_size ?middlewares ~backend ()

View file

@ -1,6 +1,7 @@
module TH = Tiny_httpd_core
val create :
?enable_logging:bool ->
?masksigpipe:bool ->
?max_connections:int ->
?max_buf_pool_size:int ->