# HG changeset patch # User Matthew Wild # Date 1609854590 0 # Node ID 456b9f608fcf9667cfba1bd7bf9eba2151af50d0 # Parent 4bba01ce2f983286cfc4a81b0a4a6582624a5aaa mod_log_http: Switch to line buffering (thanks Zash+Ge0rG) diff -r 4bba01ce2f98 -r 456b9f608fcf mod_log_http/mod_log_http.lua --- a/mod_log_http/mod_log_http.lua Sat Jan 02 15:38:15 2021 +0100 +++ b/mod_log_http/mod_log_http.lua Tue Jan 05 13:49:50 2021 +0000 @@ -1,10 +1,11 @@ -module:set_global(); +Addmodule:set_global(); local http = require "net.http"; local codes = require "net.http.codes"; local json = require "util.json"; local log = assert(io.open(assert(module:get_option_string("log_http_file"), "Please supply log_http_file in the config"), "a+")); +log:setvbuf("line"); local function append_request(id, req) local headers = {};