Python logging

    {
        "version": 1,
        "disable_existing_loggers": false,
        "formatters": {
            "verbose": {
                "format": "%(asctime)s %(levelname)-8s [%(name)s] %(message)s",
                "datefmt": "%Y-%m-%d %H:%M:%S",
            },
            "simple": {
                "format": "%(levelname)-8s %(message)s",
            },
        },
        "handlers": {
            "console": {
                "level": "DEBUG",
                "class": "logging.StreamHandler",
                "formatter": "simple",
                "stream": "ext://sys.stdout"
            },
            "info_file": {
                "level": "INFO",
                "filename": "var/log/info.log",
                "class": "logging.handlers.RotatingFileHandler",
                "formatter": "verbose",
                "filename": PARSER_INFO_LOG_FNAME,
                "maxBytes": 10 * 1024 * 1024,
                "backupCount": 1,
            },
            "error_file": {
                "level": "ERROR",
                "filename": "var/log/error.log",
                "class": "logging.handlers.RotatingFileHandler",
                "formatter": "verbose",
                "filename": PARSER_ERROR_LOG_FNAME,
                "maxBytes": 10 * 1024 * 1024,
                "backupCount": 2,
            }
        },
        "loggers": {
            # display sql queries
            "django.db.backends": {
                "level": "DEBUG",
                "handlers": ["console"],
                "propagate": False,
            },
        },
        "root": {
            "level": "INFO",
            "handlers": ["console", "info_handler", "error_handler"]
        }
    }