This blog is part of our Ruby 2.4 series.
In Ruby, The Logger class can be used for rotating log files daily, weekly or monthly.
At the end of the specified period, Ruby will change the file extension of the log file as follows:
The format of the suffix
for the rotated log file
In Ruby 2.3,
there was no way
to customize this suffix format.
Ruby 2.4 added the ability
to customize the suffix format
by passing an extra argument
Now, suffix of the rotated log file will use the custom date format which we passed.