https://developer.zendesk.com/rest_api/docs/core/audit_logs#getting-audit-logs
964034
def audit_log_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/audit_logs/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
89019
def ReadAPIAuditEntries(self,
                          username=None,
                          router_method_names=None,
                          min_timestamp=None,
                          max_timestamp=None):
    """"""
    results = []

    for entry in self.api_audit_entries:
      if username is not None and entry.username != username:
        continue

      if (router_method_names and
          entry.router_method_name not in router_method_names):
        continue

      if min_timestamp is not None and entry.timestamp < min_timestamp:
        continue

      if max_timestamp is not None and entry.timestamp > max_timestamp:
        continue

      results.append(entry)

    return sorted(results, key=lambda entry: entry.timestamp)
685834
public String getAuditRepositoryTransport()
    {
        String transport = getOption(AUDITOR_AUDIT_REPOSITORY_TRANSPORT_KEY);
        return (transport != null) ? transport : AUDITOR_AUDIT_REPOSITORY_DEFAULT_TRANSPORT;
    }
717181
def get_logs(self):
        ''''''
        folder = os.path.dirname(self.pcfg['log_file'])
        for path, dir, files in os.walk(folder):
            for file in files:
                if os.path.splitext(file)[-1] == '.log':
                    yield os.path.join(path, file)
758017
public function getLogs(){
        $rest = $this->getService( self::API_VPN_CLIENT_LOGS);
        $rest->GET();

        return $rest->getResult();
    }
125113
def get_logs(self, login=None, **kwargs):
        

        _login = kwargs.get(
            'login',
            login
        )
        log_events_url = GSA_LOGS_URL.format(login=_login)
        return self._request_api(url=log_events_url).json()
266712
def get_audits():
    
    checks = []
    settings = utils.get_settings('os')
    if not settings['security']['suid_sgid_enforce']:
        log("Skipping suid/sgid hardening", level=INFO)
        return checks

    # Build the blacklist and whitelist of files for suid/sgid checks.
    # There are a total of 4 lists:
    #   1. the system blacklist
    #   2. the system whitelist
    #   3. the user blacklist
    #   4. the user whitelist
    #
    # The blacklist is the set of paths which should NOT have the suid/sgid bit
    # set and the whitelist is the set of paths which MAY have the suid/sgid
    # bit setl. The user whitelist/blacklist effectively override the system
    # whitelist/blacklist.
    u_b = settings['security']['suid_sgid_blacklist']
    u_w = settings['security']['suid_sgid_whitelist']

    blacklist = set(BLACKLIST) - set(u_w + u_b)
    whitelist = set(WHITELIST) - set(u_b + u_w)

    checks.append(NoSUIDSGIDAudit(blacklist))

    dry_run = settings['security']['suid_sgid_dry_run_on_unknown']

    if settings['security']['suid_sgid_remove_from_unknown'] or dry_run:
        # If the policy is a dry_run (e.g. complain only) or remove unknown
        # suid/sgid bits then find all of the paths which have the suid/sgid
        # bit set and then remove the whitelisted paths.
        root_path = settings['environment']['root_path']
        unknown_paths = find_paths_with_suid_sgid(root_path) - set(whitelist)
        checks.append(NoSUIDSGIDAudit(unknown_paths, unless=dry_run))

    return checks
1138795
public static auditmessages[] get(nitro_service service) throws Exception{
		auditmessages obj = new auditmessages();
		auditmessages[] response = (auditmessages[])obj.get_resources(service);
		return response;
	}
1275589
def init_auditlog(portal):
    
    # reindex the auditlog folder to display the icon right in the setup
    portal.bika_setup.auditlog.reindexObject()

    # Initialize contents for audit logging
    start = time.time()
    uid_catalog = api.get_tool("uid_catalog")
    brains = uid_catalog()
    total = len(brains)

    logger.info("Initializing {} objects for the audit trail...".format(total))
    for num, brain in enumerate(brains):
        # Progress notification
        if num and num % 1000 == 0:
            transaction.commit()
            logger.info("{}/{} ojects initialized for audit logging"
                        .format(num, total))
        # End progress notification
        if num + 1 == total:
            end = time.time()
            duration = float(end-start)
            logger.info("{} ojects initialized for audit logging in {:.2f}s"
                        .format(total, duration))

        if api.get_portal_type(brain) in SKIP_TYPES_FOR_AUDIT_LOG:
            continue

        obj = api.get_object(brain)

        if not supports_snapshots(obj):
            continue

        if has_snapshots(obj):
            continue

        # Take one snapshot per review history item
        rh = api.get_review_history(obj, rev=False)
        for item in rh:
            actor = item.get("actor")
            user = get_user(actor)
            if user:
                # remember the roles of the actor
                item["roles"] = get_roles(user)
            # The review history contains the variable "time" which we will set
            # as the "modification" time
            timestamp = item.pop("time", DateTime())
            item["time"] = timestamp.ISO()
            item["modified"] = timestamp.ISO()
            item["remote_address"] = None
            take_snapshot(obj, **item)
331486
def get_log(self, request, response):
        
        return {
            'method': request.method,
            'path': request.get_full_path(),
            'code': response.status_code,
            'time': time.time(),
        }
1283386
def get_audits():
    
    audits = [TemplatedFile('/etc/login.defs', LoginContext(),
                            template_dir=TEMPLATES_DIR,
                            user='root', group='root', mode=0o0444)]
    return audits
1225248
def get_event_logs_by_request_id(self, request_id):
        

        # Get all relevant event logs
        unfiltered_logs = self._get_cci_event_logs() + self._get_security_group_event_logs()

        # Grab only those that have the specific request id
        filtered_logs = []

        for unfiltered_log in unfiltered_logs:
            try:
                metadata = json.loads(unfiltered_log['metaData'])
                if 'requestId' in metadata:
                    if metadata['requestId'] == request_id:
                        filtered_logs.append(unfiltered_log)
            except ValueError:
                continue

        return filtered_logs
313232
def get_logging_fields(self, model):
        
        rel_name = '_%s_audit_log_entry'%model._meta.object_name.lower()


        def entry_instance_to_unicode(log_entry):
            try:
                result = '%s: %s %s at %s'%(model._meta.object_name,
                                                log_entry.object_state,
                                                log_entry.get_action_type_display().lower(),
                                                log_entry.action_date,

                                                )
            except AttributeError:
                result = '%s %s at %s'%(model._meta.object_name,
                                                log_entry.get_action_type_display().lower(),
                                                log_entry.action_date

                                                )
            return result

        action_user_field = LastUserField(related_name = rel_name, editable = False)

        #check if the manager has been attached to auth user model
        if [model._meta.app_label, model.__name__] == getattr(settings, 'AUTH_USER_MODEL', 'auth.User').split("."):
            action_user_field = LastUserField(related_name = rel_name, editable = False, to = 'self')

        return {
            'action_id' : models.AutoField(primary_key = True),
            'action_date' : models.DateTimeField(default = datetime_now, editable = False, blank=False),
            'action_user' : action_user_field,
            'action_type' : models.CharField(max_length = 1, editable = False, choices = (
                ('I', _('Created')),
                ('U', _('Changed')),
                ('D', _('Deleted')),
            )),
            'object_state' : LogEntryObjectDescriptor(model),
            '__unicode__' : entry_instance_to_unicode,
        }
650200
public static tmglobal_auditnslogpolicy_binding[] get(nitro_service service) throws Exception{
		tmglobal_auditnslogpolicy_binding obj = new tmglobal_auditnslogpolicy_binding();
		tmglobal_auditnslogpolicy_binding response[] = (tmglobal_auditnslogpolicy_binding[]) obj.get_resources(service);
		return response;
	}
755747
private static Audit getSecurityAudit(JSONArray jsonArray, JSONArray global) {

        LOGGER.info("NFRR Audit Collector auditing STATIC_SECURITY_ANALYSIS");
        Audit audit = new Audit();
        audit.setType(AuditType.STATIC_SECURITY_ANALYSIS);
        Audit basicAudit;
        if ((basicAudit = doBasicAuditCheck(jsonArray, global, AuditType.STATIC_SECURITY_ANALYSIS)) != null) {
            return basicAudit;
        }
        Set<String> auditStatuses;
        for (Object o : jsonArray) {
            JSONArray auditJO = (JSONArray) ((JSONObject) o).get(STR_AUDITSTATUSES);
            Optional<Object> urlOptObj = Optional.ofNullable(((JSONObject) o).get(STR_URL));
            urlOptObj.ifPresent(urlObj -> audit.getUrl().add(urlOptObj.get().toString()));
            auditJO.stream().forEach(status -> audit.getAuditStatusCodes().add((String) status));
        }
        auditStatuses = audit.getAuditStatusCodes();
        if(auditStatuses.contains(CodeQualityAuditStatus.STATIC_SECURITY_SCAN_FAIL.name()) ||
                auditStatuses.contains(CodeQualityAuditStatus.STATIC_SECURITY_SCAN_FOUND_HIGH.name()) ||
                auditStatuses.contains(CodeQualityAuditStatus.STATIC_SECURITY_SCAN_FOUND_CRITICAL.name())){
            audit.setAuditStatus(AuditStatus.FAIL);
            audit.setDataStatus(DataStatus.OK);
        }else if(auditStatuses.contains(CodeQualityAuditStatus.STATIC_SECURITY_SCAN_OK.name()) ){
            audit.setAuditStatus(AuditStatus.OK);
            audit.setDataStatus(DataStatus.OK);
        }else {
            audit.setAuditStatus(AuditStatus.NA);
            audit.setDataStatus(DataStatus.NO_DATA);
        }
        return audit;
    }
387168
public static systemglobal_auditnslogpolicy_binding[] get(nitro_service service) throws Exception{
		systemglobal_auditnslogpolicy_binding obj = new systemglobal_auditnslogpolicy_binding();
		systemglobal_auditnslogpolicy_binding response[] = (systemglobal_auditnslogpolicy_binding[]) obj.get_resources(service);
		return response;
	}
1140587
public static auditmessages[] get(nitro_service service, auditmessages_args args) throws Exception{
		auditmessages obj = new auditmessages();
		options option = new options();
		option.set_args(nitro_util.object_to_string_withoutquotes(args));
		auditmessages[] response = (auditmessages[])obj.get_resources(service, option);
		return response;
	}