Attention is currently required from: neels, laforge, fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32043 )
Change subject: logging: add 'logging timezone (localtime|utc)' ......................................................................
Patch Set 2:
(1 comment)
File src/core/logging.c:
https://gerrit.osmocom.org/c/libosmocore/+/32043/comment/d9ff978e_25f73f0f PS1, Line 874: target->timezone = timezone;
But we do not *need* to care whether a given timezone function is available. If the system cannot generate a timestamp the way it is configured, then we just don't print one in the logs.
I'm sorry but this behavior makes no sense to me. Why they hell if I set a specific tiemstamp format I end up with having no timestamp at all? It really makes no sense. If I try to set a timestamp and the system/app is not supporting it, it should just tell me when I try to configure it that way.
The only reason you argue for not doing that you are presenting are: - because it makes code more complex: A few more lines of code checking errors? - because it adds non-conforming API: aka having a function return a return code while others do. I really see no problem here. Specially in a lib public API, it makes totally sense to have it return an error code. - make it harder to launch an osmo program...: Not really. If you attempt to configure it in a way the system doesn't support it then it fails with the related error message, then you remove/change the config option which makes no sense in that system and then get an expected behavior.