Merge pull request #10167 from leoetlino/log-level-constant Turn MAX_LOGLEVEL into a true constant (and fix self-comparison warning)