From 8113eb7c791890869fb8818da3be8e7ad8e37ea8 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 28 Aug 2014 18:45:00 +0100 Subject: [PATCH] Turn of trace_function logging --- synapse/handlers/presence.py | 16 ++++++++-------- synapse/notifier.py | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index 223ddfc65..174a92d81 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -18,7 +18,7 @@ from twisted.internet import defer from synapse.api.errors import SynapseError, AuthError from synapse.api.constants import PresenceState -from synapse.util.logutils import trace_function, log_function +from synapse.util.logutils import log_function from ._base import BaseHandler @@ -190,7 +190,7 @@ class PresenceHandler(BaseHandler): defer.returnValue(state) @defer.inlineCallbacks - @trace_function + @log_function def set_state(self, target_user, auth_user, state): # return # TODO (erikj): Turn this back on. Why did we end up sending EDUs @@ -248,12 +248,12 @@ class PresenceHandler(BaseHandler): self.push_presence(user, statuscache=statuscache) - @trace_function + @log_function def started_user_eventstream(self, user): # TODO(paul): Use "last online" state self.set_state(user, user, {"state": PresenceState.ONLINE}) - @trace_function + @log_function def stopped_user_eventstream(self, user): # TODO(paul): Save current state as "last online" state self.set_state(user, user, {"state": PresenceState.OFFLINE}) @@ -383,7 +383,7 @@ class PresenceHandler(BaseHandler): defer.returnValue(presence) @defer.inlineCallbacks - @trace_function + @log_function def start_polling_presence(self, user, target_user=None, state=None): logger.debug("Start polling for presence from %s", user) @@ -461,7 +461,7 @@ class PresenceHandler(BaseHandler): content={"poll": [u.to_string() for u in to_poll]} ) - @trace_function + @log_function def stop_polling_presence(self, user, target_user=None): logger.debug("Stop polling for presence from %s", user) @@ -501,7 +501,7 @@ class PresenceHandler(BaseHandler): if not self._local_pushmap[localpart]: del self._local_pushmap[localpart] - @trace_function + @log_function def _stop_polling_remote(self, user, domain, remoteusers): to_unpoll = set() @@ -522,7 +522,7 @@ class PresenceHandler(BaseHandler): ) @defer.inlineCallbacks - @trace_function + @log_function def push_presence(self, user, statuscache): assert(user.is_mine) diff --git a/synapse/notifier.py b/synapse/notifier.py index d222644cb..b6d5ec482 100644 --- a/synapse/notifier.py +++ b/synapse/notifier.py @@ -15,7 +15,7 @@ from twisted.internet import defer, reactor -from synapse.util.logutils import log_function, trace_function +from synapse.util.logutils import log_function import logging @@ -119,7 +119,7 @@ class Notifier(object): ) @defer.inlineCallbacks - @trace_function + @log_function def on_new_user_event(self, users=[], rooms=[]): """ Used to inform listeners that something has happend presence/user event wise.