Diff

mod_log_json/mod_log_json.lua @ 3734:b8bd79c57040

mod_log_json: Open file in read+append mode Dunno why but this is what core.loggingmanager does
author Kim Alvefur <zash@zash.se>
date Sun, 03 Nov 2019 14:33:03 +0100
parent 3733:9a3d25311fd9
child 3746:bc865568ff02
line wrap: on
line diff
--- a/mod_log_json/mod_log_json.lua	Sun Nov 03 14:33:01 2019 +0100
+++ b/mod_log_json/mod_log_json.lua	Sun Nov 03 14:33:03 2019 +0100
@@ -6,7 +6,7 @@
 module:set_global();
 
 local function sink_maker(config)
-	local logfile = io.open(config.filename, "a");
+	local logfile = io.open(config.filename, "a+");
 	logfile:setvbuf("no");
 	return function (source, level, message, ...)
 		local args = pack(...);