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)
126126
127127 tokens = filter (t -> isa (t, Dates. DatePart), collect (fmt. tokens))
128128 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 ) )
130130 throw (ArgumentError (" rotating the logger with sub-minute resolution not supported" ))
131131 end
132132 return ceil (now (), minimum_timescale)
Original file line number Diff line number Diff line change 189189 l1 = DatetimeRotatingFileLogger (dir, dateformat " yyyy-mm-dd.\l\o\g " )
190190 l2 = DatetimeRotatingFileLogger (identity, dir, dateformat " yyyy-mm-dd.\l\o\g " )
191191 @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 " )
192197 end
193198end
194199
You can’t perform that action at this time.
0 commit comments