changeset 4317:456b9f608fcf

mod_log_http: Switch to line buffering (thanks Zash+Ge0rG)
author Matthew Wild <mwild1@gmail.com>
date Tue, 05 Jan 2021 13:49:50 +0000
parents 4bba01ce2f98
children 3dd7840cb923
files mod_log_http/mod_log_http.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 = {};