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

log.debug { expensive } always evaluates the block #290

Open
jreidinger opened this issue Apr 6, 2023 · 0 comments
Open

log.debug { expensive } always evaluates the block #290

jreidinger opened this issue Apr 6, 2023 · 0 comments

Comments

@jreidinger
Copy link
Member

Debug filtering is done too deep and ruby does not know about it. So result is that there is no easy way to avoid expensive log calls using block as documented in Logger class https://docs.ruby-lang.org/en/master/Logger.html#class-Logger-label-Entries

Proof in irb:

1 require "yast"
2 
3 include Yast::Logger
4 
5 log.debug { puts "eval"; "log content" }
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

1 participant