[PATCH v5 1/7] Add sanity checks for the log levels