{"record":{"id":"e838a04758e9cd60","repo":"invoke-ai/InvokeAI","slug":"args-is-not-a-value-argument-list-for-syslog-log","errorCode":null,"errorMessage":"{args} is not a value argument list for syslog logging","messagePattern":"(.+?) is not a value argument list for syslog logging","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/backend/util/logging.py","lineNumber":406,"sourceCode":"            raise ValueError(\"syslog is not available on this system\")\n        if not args:\n            args = \"/dev/log\" if Path(\"/dev/log\").exists() else \"address:localhost:514\"\n        syslog_args: Dict[str, Any] = {}\n        try:\n            for a in args.split(\",\"):\n                arg_name, *arg_value = a.split(\":\", 2)\n                if arg_name == \"address\":\n                    host, *port_list = arg_value\n                    port = 514 if not port_list else int(port_list[0])\n                    syslog_args[\"address\"] = (host, port)\n                elif arg_name == \"facility\":\n                    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","sourceCodeStart":388,"sourceCodeEnd":424,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/backend/util/logging.py#L388-L424","documentation":"InvokeAI's get_loggers parses user-supplied syslog handler arguments (e.g. 'syslog=host,facility=...', 'dev_log=/dev/log') via _parse_syslog_args, mapping names through _FACILITY_MAP/_SOCK_MAP. If any exception occurs while interpreting the argument list — unknown facility/socktype, bad indices, malformed key=value pairs — the generic except re-raises it as this ValueError. It signals the syslog logging config string was not valid.","triggerScenarios":"Calling get_loggers (or InvokeAIAppConfig logging config) with a syslog argument list that references a facility or socktype name not present in _FACILITY_MAP/_SOCK_MAP, uses wrong positional value format, or otherwise causes any exception during parsing (e.g. missing value after 'facility=' or 'socktype=').","commonSituations":"Typos in facility names ('local1' vs 'local1' style mismatches, 'daemon' misspelled), using socktype values like 'tcp'/'udp' in an unexpected format, passing syslog args without a value list, copying an example from another logging library.","solutions":["Check the syslog argument string matches the expected format: name=value pairs for facility and socktype, plus an address arg.","Verify facility and socktype values are keys in _FACILITY_MAP and _SOCK_MAP in invokeai/backend/util/logging.py.","Provide a value after each key (e.g. facility=local7,socktype=udp); missing values cause the exception.","Temporarily remove the syslog arg to confirm the rest of the logging config works, then re-add pieces incrementally."],"exampleFix":"// before\nlogging=\"syslog=host=facility=audit\"\n// after\nlogging=\"syslog=/dev/log,facility=daemon,socktype=udp\"","handlingStrategy":"validation","validationCode":"def validate_syslog_args(args: str) -> bool:\n    parts = [p for p in args.split(\",\") if p]\n    return all((\"=\" in p) or p for p in parts) and len(parts) > 0","typeGuard":null,"tryCatchPattern":"try:\n    logger = get_loggers(app, log_level_name, format=\"syslog=...,facility=daemon,socktype=udp\")\nexcept ValueError as e:\n    if \"is not a value argument list for syslog\" in str(e):\n        logger = get_loggers(app, log_level_name, format=\"console\")  # fall back","preventionTips":["Copy syslog arg format exactly from the docs: address[,facility=NAME][,socktype=udp|tcp].","Cross-check facility/socktype names against _FACILITY_MAP and _SOCK_MAP in invokeai/backend/util/logging.py.","Test the logging config with a minimal startup before deploying."],"tags":["python","logging","config","valueerror"],"backgroundTag":"invalid-logging-config","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}