+ // Map PHP error constant to a PSR-3 severity level.
+ // Avoid use of "DEBUG" or "INFO" levels, unless the
+ // error should evade error monitoring and alerts.
+ //
+ // To decide the log level, ask yourself: "Has the
+ // program's behaviour diverged from what the written
+ // code expected?"
+ //
+ // For example, use of a deprecated method or violating a strict standard
+ // has no impact on functional behaviour (Warning). On the other hand,
+ // accessing an undefined variable makes behaviour diverge from what the
+ // author intended/expected. PHP recovers from an undefined variables by
+ // yielding null and continuing execution, but it remains a change in
+ // behaviour given the null was not part of the code and is likely not
+ // accounted for.