From bef60da7f06d1a11fb4b893047ba41c1d7293737 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Fri, 9 Oct 2020 16:42:04 +0000 Subject: [PATCH] Incorporate pending logs from load during reloads The load() method for Universe class objects accumulates potential log entries because it can be called when logging hasn't been set up yet (for example, early at service start). When called during a reload, these messages were previously discarded. Instead, add them to the loglines attribute of the new universe so they will get properly logged. --- mudpy/misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mudpy/misc.py b/mudpy/misc.py index 81b43ef..86e4b9d 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -1463,9 +1463,9 @@ def reload_data(): old_loglines = universe.loglines[:] for element in list(universe.contents.values()): element.destroy() - universe.load() + pending_loglines = universe.load() new_loglines = universe.loglines[:] - universe.loglines = old_loglines + new_loglines + universe.loglines = old_loglines + new_loglines + pending_loglines for user in old_userlist: user.reload() -- 2.11.0