You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect that the return value from using a logger method like debug or info would be nil.
The following example is from a bin/console session using the code example from the documentation. The return value from a log line being printed is a here list of logger outputters/formatters (not falsy).
2.4.0 :004 > Ecraft::LoggingLibrary
=> Ecraft::LoggingLibrary
2.4.0 :005 > class MyClass
2.4.0 :006?> include Ecraft::LoggingLibrary::Loggable
2.4.0 :007?> def load_data_from_database
2.4.0 :008?> logger.info('Starting to load data from database')
2.4.0 :009?> end
2.4.0 :010?> end
=> :load_data_from_database
2.4.0 :011 > c=MyClass.new
=> #<MyClass:0x007ff8a38a19b8>
2.4.0 :012 > c.load_data_from_database
INFO [2017-01-25 17:55:37.617] MyClass: Starting to load data from database
=> [#<Logger:0x007ff8a284f538 @level=1, @progname="MyClass", @default_formatter=#<Logger::Formatter:0x007ff8a284f4e8 @datetime_format=nil>, @formatter=#<Ecraft::LoggingLibrary::CustomFormatter:0x007ff8a284f268 @datetime_format=nil>, @logdev=#<Logger::LogDevice:0x007ff8a284f470 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @mon_owner=nil, @mon_count=0, @mon_mutex=#<Thread::Mutex:0x007ff8a284f3f8>>>]
The text was updated successfully, but these errors were encountered:
olleolleolle
changed the title
Feature request: logger method to return nil
Feature request: logger methods to return nil
Jan 25, 2017
I would expect that the return value from using a logger method like
debug
orinfo
would benil
.The following example is from a
bin/console
session using the code example from the documentation. The return value from a log line being printed is a here list of logger outputters/formatters (not falsy).The text was updated successfully, but these errors were encountered: