The default time string is not localized for using locale specific formatting, but is instead hardcoded to a ','. https://hg.python.org/cpython/file/c87e00a6258d/Lib/logging/__init__.py#l483 demonstrates this. Instead I think we should set that to the value of: locale.localeconv()['decimal_point'] While this clearly a very minor issue, I stare at enough logging output data that falls back to default formats (due to testing environments) that would love for this to be locale aware.
It's not so surprising, since the string before the milliseconds part is a strftime() result, not a whole number. The decimal point need not necessarily be used for this. Just like the rest of the default time format, it is probably best for the millisecond part to be locale independent unless chosen to be locale aware by the programmer. Using the comma is apparently common among loggers. I've seen it in logs generated by log4j and log4cpp as well.
ISO 8601 governs the format used. From the Wikipedia article on the same: "A decimal mark, either a comma or a dot (without any preference as stated in resolution 10 of the 22nd General Conference CGPM in 2003, but with a preference for a comma according to ISO 8601:2004) is used as a separator between the time element and its fraction."
History
Date
User
Action
Args
2022-04-11 14:58:08
admin
set
github: 66684
2014-10-01 11:57:22
vinay.sajip
set
status: open -> closedresolution: not a bugmessages: +