|
@@ -113,7 +113,7 @@ impl SimpleLogger {
|
|
|
|
|
|
#[cfg(feature = "timestamps")]
|
|
|
timestamps: Timestamps::Utc,
|
|
|
-
|
|
|
+
|
|
|
#[cfg(feature = "timestamps")]
|
|
|
timeformat: None,
|
|
|
|
|
@@ -625,6 +625,15 @@ mod test {
|
|
|
assert!(builder.timestamps == Timestamps::Local);
|
|
|
}
|
|
|
|
|
|
+ #[test]
|
|
|
+ #[cfg(feature = "timestamps")]
|
|
|
+ #[allow(deprecated)]
|
|
|
+ fn test_with_timeformat() {
|
|
|
+ let builder =
|
|
|
+ SimpleLogger::new().with_custom_timestamps(time::macros::format_description!("[hour]:[minute]:[second]"));
|
|
|
+ assert!(builder.timeformat.is_some());
|
|
|
+ }
|
|
|
+
|
|
|
#[test]
|
|
|
#[cfg(feature = "colored")]
|
|
|
fn test_with_colors() {
|