<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_logs(room):
 """Deletes chat logs"""

    from indico_chat.plugin import ChatPlugin

    base_url = ChatPlugin.settings.get('log_url')
    if not base_url or room.custom_server:
        return

    try:
        response = requests.get(posixpath.join(base_url, 'delete'), params={'cr': room.jid}).json()
    except (RequestException, ValueError):
        current_plugin.logger.exception('Could not delete logs for %s', room.jid)
        return
    if not response.get('success'):
        current_plugin.logger.warning('Could not delete logs for %s: %s', room.jid, response.get('error'))