Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding block support to keep API compatibility with stdlib Logger #3

Merged
merged 4 commits into from
Apr 24, 2016

Conversation

tmichel
Copy link
Member

@tmichel tmichel commented Apr 23, 2016

This pull request:

  • Adds support for blocks.

    logger = Logr.Logger.new(STDOUT)
    logger.debug { "this a message" }
    
  • Fixes the executables path so the bin directory is kept for development purposes and the exe directory is for gem executables. At the moment we don't have any.

  • Adds @tmichel to authors.

  • Add binstubs for rspec and rake. No more bundle exec rake ... or bundle exec rspec

The blocks are only evaluated when the level of the logger is high
enough. This is useful when generating the log message is rather
expensive.

The if any non-nil message is give that will always take precedence over
the block.
@rgabo
Copy link
Contributor

rgabo commented Apr 23, 2016

LGTM

@rgabo rgabo merged commit a8a6a21 into master Apr 24, 2016
@rgabo rgabo deleted the block branch April 24, 2016 07:47
@tmichel
Copy link
Member Author

tmichel commented Apr 24, 2016

@martonpe could you please make a release and push it to rubygems? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants