Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Logger#<<
(untyped msg) -> (untyped | nil)
<<(msg)
lib/logger.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/logger.rb, line 689
def <<(msg)
@logdev&.write(msg)
end
Writes the given msg to the log with no formatting; returns the number of characters written, or nil if no log device exists:
Example
logger = Logger.new($stdout) logger << 'My message.' # => 10
Output:
My message.