3 ms·
I mean there's no reason you couldn't have a thread-local override to the log level and restore it after the function call. The fact that logging is at all int
by Spivak 6y ago
I mean there's no reason you couldn't have a thread-local override to the log level and restore it after the function call.
The fact that logging is at all intermixed with business logic I think is the main problem. I should be able to take a fully working logless program and apply different logging profiles to it. What gets logged should be a function of the person invoking the program.
- the_af 6y agoDefinitely. I was trying to argue something about intermixing logging with app logic :) It indeed seems to me the decision about what to log should be the caller's, not the callee's, and so it shouldn't be hardcoded within the latter.