I've found myself wanting at times to keep logging outside the fuction, but then I realized I would have to write a lot of extra comments to fill in for the documentation the logging itself provides.
As long as the logging logic itself is kept elsewhere, having logging instructions within the code is not an obstruction. Logging events themselves can have semantic value, as they would often mark some key point in the execution.
As long as the logging logic itself is kept elsewhere, having logging instructions within the code is not an obstruction. Logging events themselves can have semantic value, as they would often mark some key point in the execution.