Description
Bug report
Bug description:
Because logging.config.dictConfig
can only pass constructor parameters, it’s impossible to set SysLogHandler.append_nul
via dictConfig
(for that matter, it’s also impossible to set ident
, but that doesn’t really matter because you can just prepend the relevant text to every message in the formatter instead). Given that the SysLogHandler
constructor only takes parameters of specific fixed names, no correct code can already have been passing a parameter to it named append_nul
and been expecting something else to happen, so I don’t see how this would be a backwards compatibility issue.
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Metadata
Metadata
Assignees
Projects
Status
Activity
vsajip commentedon May 11, 2025
Your assertion "can only pass constructor parameters" is not quite correct - you can pass things other than constructor parameters, as described in the documentation. The following script:
prints:
So, I propose that this issue be closed as invalid.
Hawk777 commentedon May 12, 2025
Yes it does; apologies for the noise. I just read the section of Dictionary Schema Details about handlers but missed that this mechanism exists.