{"record":{"id":"5aed512bad07da66","repo":"invoke-ai/InvokeAI","slug":"please-provide-destination-for-http-logging-using","errorCode":null,"errorMessage":"please provide destination for http logging using format 'http=url'","messagePattern":"please provide destination for http logging using format 'http=url'","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/backend/util/logging.py","lineNumber":418,"sourceCode":"                    syslog_args[\"facility\"] = _FACILITY_MAP[arg_value[0]]\n                elif arg_name == \"socktype\":\n                    syslog_args[\"socktype\"] = _SOCK_MAP[arg_value[0]]\n                else:\n                    syslog_args[\"address\"] = arg_name\n        except Exception:\n            raise ValueError(f\"{args} is not a value argument list for syslog logging\")\n        return logging.handlers.SysLogHandler(**syslog_args)\n\n    @staticmethod\n    def _parse_file_args(args: Optional[str] = None) -> logging.Handler:  # noqa D102\n        if not args:\n            raise ValueError(\"please provide filename for file logging using format 'file=/path/to/logfile.txt'\")\n        return logging.FileHandler(args)\n\n    @staticmethod\n    def _parse_http_args(args: Optional[str] = None) -> logging.Handler:  # noqa D102\n        if not args:\n            raise ValueError(\"please provide destination for http logging using format 'http=url'\")\n        arg_list = args.split(\",\")\n        url = urllib.parse.urlparse(arg_list.pop(0))\n        if url.scheme != \"http\":\n            raise ValueError(f\"the http logging module can only log to HTTP URLs, but {url.scheme} was specified\")\n        host = url.hostname\n        path = url.path\n        port = url.port or 80\n\n        syslog_args: Dict[str, Any] = {}\n        for a in arg_list:\n            arg_name, *arg_value = a.split(\":\", 2)\n            if arg_name == \"method\":\n                method = arg_value[0] if len(arg_value) > 0 else \"GET\"\n                syslog_args[arg_name] = method\n            else:  # TODO: Provide support for SSL context and credentials\n                pass\n        return logging.handlers.HTTPHandler(f\"{host}:{port}\", path, **syslog_args)\n","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/backend/util/logging.py#L400-L436","documentation":"_parse_http_args builds a logging.handlers.HTTPHandler from an 'http=url' logging argument. When args is missing or empty there is no destination URL to parse, so the library raises this ValueError describing the required 'http=url' format. It protects against enabling HTTP logging without a target.","triggerScenarios":"Configuring logging as 'http' or 'http=' (empty value) in InvokeAI's logging options consumed by get_loggers.","commonSituations":"Specifying http logging in invokeai.yaml without a URL, truncating the value during shell quoting, typos that split the '=' from the URL.","solutions":["Provide a full URL: logging='http=http://logserver:8080/path'.","Ensure the value after 'http=' is non-empty and not consumed by shell quoting/variable expansion.","Additional per-request args can follow the URL after commas (e.g. 'http=http://host/path,key=value')."],"exampleFix":"// before\n--logging http\n// after\n--logging http=http://localhost:9000/logs","handlingStrategy":"validation","validationCode":"if log_format.startswith(\"http\"):\n    dest = log_format.split(\"=\", 1)[1] if \"=\" in log_format else \"\"\n    if not dest:\n        raise SystemExit(\"--logging http requires a destination: http=http://host:port/path\")","typeGuard":null,"tryCatchPattern":"try:\n    get_loggers(app, level, format=\"http=http://loghost:8080/\")\nexcept ValueError as e:\n    if \"destination for http logging\" in str(e):\n        log.error(\"http logging needs 'http=<url>'\")\n        raise","preventionTips":["Always provide a complete URL after 'http='.","Quote the value in shells so '=' and commas survive.","Confirm the endpoint is reachable with curl before configuring."],"tags":["python","logging","config","valueerror"],"backgroundTag":"missing-required-argument","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}