Use logging instead of prints, enable timestamps
- Mar 23, 2022
-
-
Andrej Shadura authored
Signed-off-by:
Andrej Shadura <andrew.shadura@collabora.co.uk>
-
Andrej Shadura authored
The logging subsystem is more versatile and provides more features than manual log prints. Timestamps are very often useful for tracking down timing issues, enable them for the root logger. This current logging configuration doesn’t include the module/logger name in the message format as it clutters the logs. This may be revisited later when the logging system is overhauled to support structured logging and better tracing. Quart/Hypercorn’s logger has its own log printing handler, so as we currently only print logs on the stdout, we need to disable the propagation to prevent access logs from being duplicated. Signed-off-by:
Andrej Shadura <andrew.shadura@collabora.co.uk>
-
Andrej Shadura authored
Default arguments are not cloned upon a function call, so once a default value is mutated, it will be passed on to the function the next time it is called, similarly to static variables in C. Since this is clearly a footgun, don’t do that. Signed-off-by:
Andrej Shadura <andrew.shadura@collabora.co.uk>
-