| ▲ | tsimionescu a day ago | |||||||||||||||||||||||||||||||
Does that mean the log level is a compilation parameter? Ideally, log levels shouldn't even be startup parameters, they should be changeable on the fly, at least for any server side code. Having to restart if bad enough, having to recompile to get debug logs would be an extraordinary nightmare (not only do you need to get your customers to reproduce the issue with debug logs, you actually have to ship them new binaries, which likely implies export controls and security validations etc). | ||||||||||||||||||||||||||||||||
| ▲ | bluGill a day ago | parent | next [-] | |||||||||||||||||||||||||||||||
I don't know how rust does it, but my internal C++ framework has a global static array so that we can lookup the current log level quickly, and change it at runtime as needed. It is very valuable to turn on specific debug logs at times, when someone has a problem and we want to know what some code is doing | ||||||||||||||||||||||||||||||||
| ▲ | TZubiri a day ago | parent | prev [-] | |||||||||||||||||||||||||||||||
I know this is standard practice, but I personally think it's more professional to attach a gdb like debugger to a process instead of depending on coded log statements. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||