Module Import alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore Str FunctionDef arguments args NameParam defaults kwarg body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list Assign NameStore Call NameLoad keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults Str body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If BoolOpAnd Call NameLoad NameLoad Str Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler body Pass orelse Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Call AttributeLoad Str attr SubscriptLoad NameLoad Slice Num keyword SubscriptLoad NameLoad Slice Num Return Call NameLoad NameLoad SubscriptLoad NameLoad Index Num decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Dict Str Str Str Str Str NameLoad IfExp AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad NameLoad IfExp AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad decorator_list
N/A N/A logging datetime datetime onadata.libs.utils.viewer_tools get_client_ip Enum N/A object N/A N/A __name__ Enum __init__ N/A N/A self N/A enums N/A N/A N/A self enums enums N/A __getattr__ N/A N/A self item N/A N/A N/A N/A N/A self enums N/A item N/A __getitem__ N/A N/A self item N/A N/A N/A N/A N/A self __getattr__ item N/A __iter__ N/A N/A self N/A N/A N/A N/A N/A N/A self enums itervalues N/A N/A N/A Actions N/A Enum PROFILE_ACCESSED profile-accessed PUBLIC_PROFILE_ACCESSED public-profile-accessed PROFILE_SETTINGS_UPDATED profile-settings-updated USER_LOGIN user-login USER_LOGOUT user-logout USER_BULK_SUBMISSION bulk-submissions-made USER_FORMLIST_REQUESTED formlist-requested FORM_ACCESSED form-accessed FORM_PUBLISHED form-published FORM_UPDATED form-updated FORM_XLS_DOWNLOADED form-xls-downloaded FORM_XLS_UPDATED form-xls-updated FORM_DELETED form-deleted FORM_CLONED form-cloned FORM_XML_DOWNLOADED form-xml-downloaded FORM_JSON_DOWNLOADED form-json-downloaded FORM_PERMISSIONS_UPDATED form-permissions-updated FORM_ENTER_DATA_REQUESTED form-enter-data-requested FORM_MAP_VIEWED form-map-viewed FORM_DATA_VIEWED form-data-viewed EXPORT_CREATED export-created EXPORT_DOWNLOADED export-downloaded EXPORT_DELETED export-deleted EXPORT_LIST_REQUESTED export-list-requested SUBMISSION_CREATED submission-created SUBMISSION_UPDATED submission-updated SUBMISSION_DELETED submission-deleted SUBMISSION_ACCESSED submission-accessed SUBMISSION_EDIT_REQUESTED submission-edit-requested BAMBOO_LINK_CREATED bamboo-link-created BAMBOO_LINK_DELETED bamboo-link-deleted SMS_SUPPORT_ACTIVATED sms-support-activated SMS_SUPPORT_DEACTIVATED sms-support-deactivated AuditLogHandler N/A N/A logging Handler N/A __init__ N/A N/A self model N/A N/A N/A N/A N/A N/A super AuditLogHandler self __init__ N/A N/A self model_name model N/A _format N/A N/A self record N/A N/A N/A data N/A action user account audit msg created_on levelno levelname args funcName msecs relativeCreated thread name threadName exc_info pathname exc_text lineno process filename module processName N/A record formhub_action N/A record request_username N/A record account_username N/A N/A record msg N/A N/A datetime utcfromtimestamp N/A record created N/A record levelno N/A record levelname N/A record args N/A record funcName N/A record msecs N/A record relativeCreated N/A record thread N/A record name N/A record threadName N/A record exc_info N/A record pathname N/A record exc_text N/A record lineno N/A record process N/A record filename N/A record module N/A record processName N/A N/A N/A hasattr record audit N/A isinstance N/A record audit dict N/A N/A N/A data N/A audit N/A record audit N/A data N/A emit N/A N/A self record N/A N/A N/A data N/A N/A self _format record N/A N/A N/A model N/A N/A self get_model N/A self model_name N/A N/A N/A N/A N/A N/A log_entry N/A model data N/A N/A N/A log_entry save N/A get_model N/A N/A self name N/A N/A N/A names N/A N/A name split . N/A mod N/A __import__ N/A N/A . join N/A names N/A -1 fromlist N/A names N/A -1 N/A N/A getattr mod N/A names N/A -1 N/A N/A audit_log N/A N/A action request_user account_user message audit request level N/A N/A logging DEBUG N/A N/A 
    Create a log message based on these params

    @param action: Action performed e.g. form-deleted
    @param request_username: User performing the action
    @param account_username: The formhub account the action was performed on
    @param message: The message to be displayed on the log
    @param level: log level
    @param audit: a dict of key/values of other info pertaining to the action
                  e.g. form's id_string, submission uuid
    @return: None
     N/A logger N/A N/A logging getLogger audit_logger N/A extra N/A formhub_action request_username account_username client_ip audit action N/A N/A request_user username N/A request_user username N/A str request_user N/A N/A account_user username N/A account_user username N/A str account_user N/A get_client_ip request audit N/A N/A N/A logger log level message extra extra N/A