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

may-log? may returns nil with ns-whitelist #206

Closed
mikekap opened this issue Nov 30, 2016 · 2 comments
Closed

may-log? may returns nil with ns-whitelist #206

mikekap opened this issue Nov 30, 2016 · 2 comments

Comments

@mikekap
Copy link
Contributor

mikekap commented Nov 30, 2016

When ns-whitelist is set, calls like (may-log? :info) returns nil even though it should be boolean-only. This currently causes slf4j-timbre to freak out.

@ptaoussanis
Copy link
Member

Hi Mike, much thanks for the report! Apologies about the long delay in replying.

Will fix.

But for posterity would suggest that this ideally be something adjusted on slf4j-timbre's end since in Clojure nil and false are equivalently falsey. In cases where nil needs to be distinguished from false (for example in cases of Java interop), the particular consumer should normally consider a cast (boolean call), or similar - to ensure that their specific requirements (e.g. interop) are met. In particular: may-log?'s doc-string doesn't specifically guarantee a boolean output; it's name just suggests a truthy output.

Cheers! :-)

rufoa added a commit to fzakaria/slf4j-timbre that referenced this issue Jun 26, 2018
@rufoa
Copy link

rufoa commented Jun 26, 2018

@ptaoussanis I've just fixed this at our end (only just seen this issue, sorry!) so feel free to revert the changes introduced in b673a5b which are no longer required

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

No branches or pull requests

3 participants