by paulddraper · 9y ago · 0 comments
An error is logged and propogated, then logged and propogated, then logged and propogated, then pretty soon your logs are 50x copies of themselves and the flood of logging sweeps you away.
You either (a) know what you to do about an error and log it or (b) you don't know what to do and propogate it.
An error should be logged eventually, but it shouldn't be logged 20 times.
You run a process that exits with a non-zero code. Is that an error that should be logged? Or just informational? (E.g. `diff`.)
You request an HTTP resource that doesn't exist. Loggable error? Or normal result?
Only the caller knows.