Timeline for Python best practice when logging optional arguments
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 23, 2022 at 22:54 | answer | added | Gringo Suave | timeline score: 0 | |
Mar 10, 2022 at 15:50 | answer | added | Jasmijn | timeline score: 0 | |
Mar 10, 2022 at 12:06 | answer | added | jfaccioni | timeline score: 1 | |
Mar 9, 2022 at 19:36 | review | Close votes | |||
Mar 24, 2022 at 3:01 | |||||
Mar 9, 2022 at 19:00 | history | migrated | from codereview.stackexchange.com (revisions) | ||
Mar 9, 2022 at 13:38 | comment | added | Richard Neumann |
You could write a decorator for the functions you want to log, which introspects the wrapped function's signature and expected types and then dynamically generates a format string based on arguments that are e.g. not None and renders that with the given values.
|
|
Mar 9, 2022 at 10:29 | history | asked | Luke404 | CC BY-SA 4.0 |