diff --git a/horizons/scheduler.py b/horizons/scheduler.py index 8f7cd4c915c..edccdab24fb 100644 --- a/horizons/scheduler.py +++ b/horizons/scheduler.py @@ -63,7 +63,7 @@ def tick(self, tick_id): self.cur_tick = tick_id if self.cur_tick in self.schedule: - self.log.debug("Scheduler: tick is %s, callbacks: %s", self.cur_tick, [unicode(i) for i in self.schedule[self.cur_tick]]) + self.log.debug("Scheduler: tick %s, cbs: %s", self.cur_tick, len(self.schedule[self.cur_tick])) # use iteration method that works in case the list is altered during iteration # this can happen for e.g. rem_all_classinst_calls @@ -74,7 +74,7 @@ def tick(self, tick_id): # (i.e. if e.g. pop() was used here). This is an indication of invalid assumptions # in the program and should be fixed. - self.log.debug("Scheduler(t:%s) calling %s", tick_id, callback) + self.log.debug("S(t:%s): %s", tick_id, callback) callback.callback() assert callback.loops >= -1 if callback.loops != 0: @@ -223,4 +223,8 @@ def __init__(self, scheduler, callback, class_instance, run_in, loops, loop_inte self.class_instance = class_instance def __str__(self): - return "SchedCallback(%s on %s)" % (self.callback, self.class_instance) + cb = str(self.callback) + if "_move_tick" in cb: # very crude measure to reduce log noise + return "(_move_tick,%s)" % self.class_instance.worldid + + return "SchedCb(%s on %s)" % (cb, self.class_instance)