o Code simplification and refactoring:
    - Add a wrapper function for the common "log a message with a rate-limit"
      case.