Open crusty-dave opened 3 years ago
Though sloggers
currently doesn't provide this feature, slog
has a way to customize the timestamp format (e.g., slog_term::CompactFormatBuilder.use_custom_timestamp), so it seems not hard to implement it in sloggers
.
Please let me consider whether the implementation is actually possible.
After considering the above possibility, it turned out that it's difficult to allow users to specify arbitrary timestamp format in the current slog
and sloggers
designs.
However, it could be possible to add specific predefined formats (e.g., RFC3339) to the available list. Does it satisfy your requirements?
I cannot seem to find any way to do this with slog / sloggers. In log4rs I can do the following:
I would really like to be able to store timestamps as the equivalent of the following:
time.to_rfc3339_opts(SecondsFormat::Millis, true)
I didn't see any way to do this, my apologies if I missed it.
Thanks in advance.