Make log messages more uniform across all face types
I noticed that the various faces are quite inconsistent in what they log and which log level they use. I propose the following (draft) guidelines for current and future faces.
- Any abnormal condition that is not fatal (i.e. the face can continue working, usually discarding the packet that triggered this condition) must be logged at WARN level. Depending on the face implementation, this can include both non-fatal system call failures (e.g. read/write), and recoverable packet parsing errors.
- When closing a face under normal circumstances (e.g. EOF or explicit
close()invocation) use INFO level.
- When sending or receiving a packet, log the event at TRACE level.
- All log messages must include at least the face id within square brackets at the beginning of the message (example:
"[id:300] Something happened")