Returns a logging configuration dictionary with reasonable defaults.
    Defines two handlers: "default" and "file", that go to STDOUT and a
    :class:`SizeRotatingFileHandler`.

    :param log_dir:
        Directory for logs to go into.
    :param handlers:
        Which logging handlers to use.  Defaults to only 'file'
    :param filename:
        Base name of the file to log to.  Defaults to "debug.log".

def default_logging_dict(log_dir, handlers=['file'], filename='debug.log'):
    """Returns a logging configuration dictionary with reasonable defaults.
    Defines two handlers: "default" and "file", that go to STDOUT and a
    :class:`SizeRotatingFileHandler`.

    :param log_dir:
        Directory for logs to go into.
    :param handlers:
        Which logging handlers to use.  Defaults to only 'file'
    :param filename:
        Base name of the file to log to.  Defaults to "debug.log".
    """
    d = {
        'version': 1,
        'disable_existing_loggers': True,
        'formatters': {
            'escaped': {
                'format':LOG_FORMAT_ESCAPED,
            },
            'standard': {
                'format':LOG_FORMAT_STANDARD,
            },
        },
        'handlers': {
            'default': {
                'level':'DEBUG',
                'class':'logging.StreamHandler',
                'formatter':'escaped',
            },
            'file': {
                'level':'DEBUG',
                'class':'wrench.logtools.srothandler.SizeRotatingFileHandler',
                'filename': os.path.abspath(os.path.join(log_dir, filename)),
                'formatter':'standard',
                'maxBytes':300000,
            },
        },
        'loggers': {
            '': {
                'handlers':handlers,
                'propagate': False,
                'level':'DEBUG',
            },
        },
    }

    return d