-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Accept log messages via block #28
Conversation
@timriley this is ready for your eyes! |
@komidore64 This is fantastic, thank you! I've just pushed up some expanded (and passing) tests for the progname handling. Does that behaviour match your expectations? If you're happy with that, then I can get this in and cut a new release. |
I appreciate the assistance. It does! It didn't occur to me that passing
I am happy with this. That'd be great! Thank you for the quick turnaround. |
@timriley do you need anything else from me to move this forward? I'm happy to help however I can. |
@komidore64 Thank you for checking in! I've just got this ready now (had to sort out a few test failures on the main branch first). I'm going to merge this now and then cut a release. Thanks again! |
This is released as v1.0.4. Thanks again @komidore64! |
fixes #25
This patch allows a Dry-Logger instance to accept log messages via a block.
If a block is passed to
#unknown
,#debug
,#info
,#warn
,#error
, or#fatal
, the block's return value becomes the logged message much like theRuby standardlib Logger.
I added two spec tests to ensure that block passing works, but I wasn't able to
quickly figure out how to check the value of
progname
.Thank you for considering my patch!