def __init__(self, data, **kwargs): self.el = server_conector.ServerConector() self.log_dict = {} # self.log_dict['login_hash'] = data.get('login_hash', None) # self.log_dict['username'] = data.get('username', None) self.log_info = data.pop('log_info', None) if self.log_info: ip_address = self.log_info.get('ip_address', None) if ip_address: self.log_dict['ip_address'] = ip_address web_browser = self.log_info.get('web_browser', None) if web_browser: self.log_dict['web_browser'] = web_browser url_description = self.log_info.get('url_description', None) if url_description: self.log_dict['url_description'] = url_description device_description = self.log_info.get('device_description', None) if device_description: self.log_dict['device_description'] = device_description self.log_dict['json_text'] = data
def __init__(self, **kwargs): self.el = server_conector.ServerConector()