'Get a list of recent moderation actions.
Moderator actions taken within a subreddit are logged. This listing is
a view of that log with various filters to aid in analyzing the
information.
The optional `mod` parameter can be a comma-delimited list of moderator
names to restrict the results to, or the string `a` to restrict the
results to admin actions taken within the subreddit.
The `type` parameter is optional and if sent limits the log entries
returned to only those of the type specified.'

@require_oauth2_scope('modlog')
@disable_subreddit_css()
@paginated_listing(max_page_size=500, backend='cassandra')
@validate(mod=nop('mod', docs={'mod': '(optional)    a    moderator    filter'}), action=VOneOf('type', ModAction.actions))
@api_doc(api_section.moderation, uses_site=True, uri='/about/log', supports_rss=True)
def GET_moderationlog(self, num, after, reverse, count, mod, action):

    if ((not c.user_is_loggedin) or (not (c.user_is_admin or c.site.is_moderator(c.user)))):
        return self.abort404()
    VNotInTimeout().run(action_name='pageview', details_text='modlog')
    if mod:
        if (mod == 'a'):
            modnames = g.admins
        else:
            modnames = self.modname_splitter.split(mod)
        mod = []
        for name in modnames:
            try:
                mod.append(Account._by_name(name, allow_deleted=True))
            except NotFound:
                continue
        mod = (mod or None)
    if isinstance(c.site, (MultiReddit, ModSR)):
        srs = Subreddit._byID(c.site.sr_ids, return_dict=False)
        mod_ids = set(Subreddit.get_all_mod_ids(srs))
        mods = Account._byID(mod_ids, data=True)
        pane = self._make_moderationlog(srs, num, after, reverse, count, mod=mod, action=action)
    elif isinstance(c.site, FakeSubreddit):
        return self.abort404()
    else:
        mod_ids = c.site.moderators
        mods = Account._byID(mod_ids, data=True)
        pane = self._make_moderationlog(c.site, num, after, reverse, count, mod=mod, action=action)
    panes = PaneStack()
    panes.append(pane)
    action_buttons = [QueryButton(_('all'), None, query_param='type', css_class='primary')]
    for a in ModAction.actions:
        button = QueryButton(ModAction._menu[a], a, query_param='type')
        action_buttons.append(button)
    mod_buttons = [QueryButton(_('all'), None, query_param='mod', css_class='primary')]
    for mod_id in mod_ids:
        mod = mods[mod_id]
        mod_buttons.append(QueryButton(mod.name, mod.name, query_param='mod'))
    if (g.automoderator_account and all(((mod.name != g.automoderator_account) for mod in mods.values()))):
        automod_button = QueryButton(g.automoderator_account, g.automoderator_account, query_param='mod')
        mod_buttons.append(automod_button)
    mod_buttons.append(QueryButton(_('admins*'), 'a', query_param='mod'))
    base_path = request.path
    menus = [NavMenu(action_buttons, base_path=base_path, title=_('filter    by    action'), type='lightdrop', css_class='modaction-drop'), NavMenu(mod_buttons, base_path=base_path, title=_('filter    by    moderator'), type='lightdrop')]
    extension_handling = ('private' if c.user.pref_private_feeds else False)
    return EditReddit(content=panes, nav_menus=menus, location='log', extension_handling=extension_handling).render()
