File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ function next_datetime_transition(fmt::DateFormat)
126
126
127
127
tokens = filter (t -> isa (t, Dates. DatePart), collect (fmt. tokens))
128
128
minimum_timescale = first (sort (map (t -> token_timescales[extract_token (t)], tokens), lt= custom_isless))
129
- if minimum_timescale < Minute (1 )
129
+ if custom_isless ( minimum_timescale, Minute (1 ) )
130
130
throw (ArgumentError (" rotating the logger with sub-minute resolution not supported" ))
131
131
end
132
132
return ceil (now (), minimum_timescale)
Original file line number Diff line number Diff line change 189
189
l1 = DatetimeRotatingFileLogger (dir, dateformat " yyyy-mm-dd.\l\o\g " )
190
190
l2 = DatetimeRotatingFileLogger (identity, dir, dateformat " yyyy-mm-dd.\l\o\g " )
191
191
@test l. filename_pattern == l1. filename_pattern == l2. filename_pattern
192
+
193
+ # Test large resolutions, which have some weirdness related to ordering
194
+ # (see next_datetime_transition()). These should not throw.
195
+ DatetimeRotatingFileLogger (dir, raw " yyyy-mm.\l\o\g " )
196
+ DatetimeRotatingFileLogger (dir, raw " yyyy.\l\o\g " )
192
197
end
193
198
end
194
199
You can’t perform that action at this time.
0 commit comments