diff options
| author | Elias Hermoso Illera <> | 2010-05-14 18:36:02 +0530 |
|---|---|---|
| committer | Jay (Open ERP) <jvo@tinyerp.com> | 2010-05-14 18:36:02 +0530 |
| commit | 2f0ff7766a28a952e65d5bf4ed7bbbc23b6dc1c8 (patch) | |
| tree | 59003295f0fad05b0963f6b84068c88fc8137de9 /bin | |
| parent | 30ba228595a14148eda188fc5212fcadd4c4aec7 (diff) | |
[FIX] DONT pformat() each RPC request !
- move import pformat() statement to top of file
- until now server was doing pformat() for each RPC request before calling
notifyChannel function. if we wasn't in LOG_DEBUG_RPC level we lost RAM
and CPU for nothing.
bzr revid: jvo@tinyerp.com-20100514130602-1r3c31tzpz7g0s0x
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/netsvc.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/netsvc.py b/bin/netsvc.py index 34727952bab..d32513f6f39 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -365,7 +365,8 @@ class OpenERPDispatcherException(Exception): class OpenERPDispatcher: def log(self, title, msg): - Logger().notifyChannel('%s' % title, LOG_DEBUG_RPC, pformat(msg)) + if tools.config['log_level'] == logging.DEBUG_RPC: + Logger().notifyChannel('%s' % title, LOG_DEBUG_RPC, pformat(msg)) def dispatch(self, service_name, method, params): try: |
