From: Jeremy Stanley Date: Fri, 9 Oct 2020 16:42:04 +0000 (+0000) Subject: Incorporate pending logs from load during reloads X-Git-Tag: 0.4.0~22 X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=commitdiff_plain;h=bef60da7f06d1a11fb4b893047ba41c1d7293737 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. --- 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()