ecraft / ecraft/logging_library

Feature request: logger methods to return nil

Open
#3 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

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
=> #
2.4.0 :012 > c.load_data_from_database
INFO [2017-01-25 17:55:37.617] MyClass: Starting to load data from database
=> [#, @formatter=#, @logdev=#>, @mon_owner=nil, @mon_count=0, @mon_mutex=#>>]

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.