End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Logger#datetime_format=
datetime_format=(datetime_format)
lib/logger.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/logger.rb, line 431
def datetime_format=(datetime_format)
@default_formatter.datetime_format = datetime_format
end
Sets the date-time format.
Argument datetime_format should be either of these:
-
A string suitable for use as a format for method
Time#strftime. -
nil: the logger uses'%Y-%m-%dT%H:%M:%S.%6N'.