{"record":{"id":"ec93327c546c9765","repo":"invoke-ai/InvokeAI","slug":"syslog-is-not-available-on-this-system","errorCode":null,"errorMessage":"syslog is not available on this system","messagePattern":"syslog is not available on this system","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/backend/util/logging.py","lineNumber":388,"sourceCode":"\n            elif handler_name == \"syslog\":\n                ch = cls._parse_syslog_args(arg)\n                handlers.append(ch)\n\n            elif handler_name == \"file\":\n                ch = cls._parse_file_args(arg)\n                ch.setFormatter(formatter())\n                handlers.append(ch)\n\n            elif handler_name == \"http\":\n                ch = cls._parse_http_args(arg)\n                handlers.append(ch)\n        return handlers\n\n    @staticmethod\n    def _parse_syslog_args(args: Optional[str] = None) -> logging.Handler:\n        if not SYSLOG_AVAILABLE:\n            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\")","sourceCodeStart":370,"sourceCodeEnd":406,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/backend/util/logging.py#L370-L406","documentation":"InvokeAI's logging config supports a syslog handler, but only when Python's built-in syslog module is importable (SYSLOG_AVAILABLE). _parse_syslog_args raises this ValueError when syslog logging is requested on a platform where the syslog module does not exist (Windows) or failed to import.","triggerScenarios":"Configuring InvokeAI logging with a syslog destination (e.g. --log syslog or log_handler_config using syslog) on a system without the syslog module, such as Windows or a Python build without syslog support.","commonSituations":"Running InvokeAI on Windows with a config copied from a Linux machine; minimal/containers builds where syslog import fails; copying log configs between environments.","solutions":["Switch the log handler to console or file on platforms without syslog","Run on Linux/Unix where the syslog module exists, or use network syslog via the 'address:localhost:514' form only if the module imports","Remove the syslog entry from the logging config (invokeai.yaml / log handlers)"],"exampleFix":"// before (invokeai.yaml, Windows)\nlog_handlers: [syslog]\n// after\nlog_handlers: [console]","handlingStrategy":"fallback","validationCode":"try:\n    import syslog  # noqa\n    SYSLOG_OK = True\nexcept ImportError:\n    SYSLOG_OK = False\nhandlers = [\"syslog\"] if SYSLOG_OK else [\"console\"]","typeGuard":"def syslog_supported():\n    try:\n        import syslog\n        return True\n    except ImportError:\n        return False","tryCatchPattern":"try:\n    handler = InvokeAIAppConfig._parse_syslog_args(args)\nexcept ValueError:\n    logger.warning(\"syslog unavailable; falling back to console logging\")\n    handler = logging.StreamHandler()","preventionTips":["Detect platform before adding syslog to log handler config","Keep separate config files per OS (Windows cannot use syslog)","Prefer file or console handlers in containers unless forwarding to a remote syslog"],"tags":["valueerror","logging","syslog","platform"],"backgroundTag":"handler-unavailable-on-platform","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}