comparison rhodecode/lib/utils.py @ 3545:e2fad0c6b19a beta

better logging
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 18 Mar 2013 18:20:46 +0100
parents 0ad025ee005e
children ca7785fae354
comparison
equal deleted inserted replaced
3544:c0a157ab9a15 3545:e2fad0c6b19a
160 160
161 user_log.action_date = datetime.datetime.now() 161 user_log.action_date = datetime.datetime.now()
162 user_log.user_ip = ipaddr 162 user_log.user_ip = ipaddr
163 sa.add(user_log) 163 sa.add(user_log)
164 164
165 log.info('Logging action %s on %s by %s' % 165 log.info('Logging action:%s on %s by user:%s ip:%s' %
166 (action, safe_unicode(repo), user_obj)) 166 (action, safe_unicode(repo), user_obj, ipaddr))
167 if commit: 167 if commit:
168 sa.commit() 168 sa.commit()
169 except: 169 except:
170 log.error(traceback.format_exc()) 170 log.error(traceback.format_exc())
171 raise 171 raise