4 ms·
I disagree with doing away with the Warning log level. It's very useful for errors that don't negatively impair the function of a program, yet should be capture
by bb101 11y ago
I disagree with doing away with the Warning log level. It's very useful for errors that don't negatively impair the function of a program, yet should be captured.
For example, converting a user input to an integer. You can provide safe defaults if the value doesn't convert so it doesn't break the flow. As the developer however, if you see too many warnings with conversion errors then you may want to change the label of the form field, or provide some guidance to make it more clear to the user.
- qznc 11y ago"too many warnings" is a very vague condition. For a similar example: The D compiler gives very few warnings and some people want to remove those as well. The argument is that the compiler should not do the job of static analysis tools, just because it is convenient or easy. A compiler should either generate code or give an error. If something is for developers only, make it debug-level. However, in the server environment, there is also the IT/sysadmin role between user and developer. It makes sense to provide a level specifically for them. "warning" mostly fits that.
- mattmanser 11y agoA good example is when you're dealing with third party APIs. They break, a lot, without you really knowing why and often not really knowing how they're going to fall over (even google's, one of our reports using the Adwords API fell over last week because it was returning 500s for an hour or so and then just worked again). So say you're doing an hourly sync, and it falls over, you want to log a warning. It happens, no need to send out the fire engines. If you're getting a warning every hour, that's "too many warnings".
- thrownaway2424 11y agoI agree. I tend to use warnings for assumptions that are violated at runtime, such as "this can never happen" events. Errors are for errors, such as unreachable backends.
- justinsaccount 11y agoI got this on a box the other day: postfix/postdrop[21416]: warning: mail_queue_enter: create file maildrop/465240.21416: No space left on device My question is, if that is a warning, what's an error?
- deweerdt 11y agoI see warning as an error where some acceptable course of action could be taken without needing to abort the action. For example, the user has provided a config with two TCP ports to listen to, but the program only supports one. You can either error out, and abort the action to listen to a port, or warn the user saying that you chose one of the ports, and proceed with listening to a port.