Bugs fix, a new version haproxy
This commit is contained in:
Pavel Loginov
2019-12-17 16:36:38 +03:00
parent b045b2aafc
commit 0072b1babf
6 changed files with 13 additions and 6 deletions

View File

@@ -53,12 +53,14 @@ def logging(serv, action, **kwargs):
try:
IP = cgi.escape(os.environ["REMOTE_ADDR"])
except:
IP = ''
try:
cookie = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE"))
user_uuid = cookie.get('uuid')
login = sql.get_user_name_by_uuid(user_uuid.value)
except:
IP = ''
login = kwargs.get('login')
except:
login = ''
if kwargs.get('alerting') == 1:
mess = get_data('date_in_log') + action + "\n"