awslabs / flowgger

A fast data collector in Rust
BSD 2-Clause "Simplified" License
834 stars 55 forks source link

validate time format #69

Closed rejao closed 2 years ago

rejao commented 2 years ago

Issue #, if available:

Description of changes: Added warning if running with old time format from chrono and falling back to default one if invalid.

The check is simple - just making sure that if % symbol is used in time format strings, it needs to be preceded by two \ - this two \ are necessary to have a valid toml file.

So this is valid value: "\%Y" And this is not: "%Y"

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.