Comparison

core/loggingmanager.lua @ 4117:b42ca82b0ea4

loggingmanager: Remove event hook that never fired anyway, and held logfiles open - leave the GC to close them now.
author Matthew Wild <mwild1@gmail.com>
date Tue, 11 Jan 2011 22:40:09 +0000
parent 3870:84ee4a4ef7d5
child 4123:0c9399a66b17
comparison
equal deleted inserted replaced
4115:801725a32c96 4117:b42ca82b0ea4
264 if not logfile then 264 if not logfile then
265 return empty_function; 265 return empty_function;
266 end 266 end
267 local write, flush = logfile.write, logfile.flush; 267 local write, flush = logfile.write, logfile.flush;
268 268
269 prosody.events.add_handler("logging-reloading", function ()
270 if logfile then
271 logfile:close();
272 end
273 end);
274
275 local timestamps = config.timestamps; 269 local timestamps = config.timestamps;
276 270
277 if timestamps == nil or timestamps == true then 271 if timestamps == nil or timestamps == true then
278 timestamps = default_timestamp; -- Default format 272 timestamps = default_timestamp; -- Default format
279 end 273 end