daroczig / logger

A lightweight, modern and flexible, log4j and futile.logger inspired logging utility for R
https://daroczig.github.io/logger
280 stars 41 forks source link

unpacking `list(...)` #92

Closed Polkas closed 2 years ago

Polkas commented 2 years ago

https://github.com/daroczig/logger/blob/e1b9a415d2ad15523e80b6f143d0c5bfe98bc34a/R/logger.R#L323

I think list(...) should be at the top of the function definition to no repeat the unpacking process for an every for loop iteration (important even if this usually is only one iter). Another thing is a good practice to unpack ... at the top of the function, I was a little bit confused for a few seconds here. BTW log_arg looks to be the same for all iters. Thanks

daroczig commented 2 years ago

Thanks, good points :+1:

Please feel free to open a PR addressing these, otherwise, I will try to get there later this week.

Polkas commented 2 years ago

Thanks for so quick response. No problem, I will create a PR. I will be happy to have a small part in such valuable project. I will go through whole code, and report any space for improvement (if I will find sth). Have a great day.

daroczig commented 2 years ago

Thanks for the report and the related fix :bow: