973636bd2a introduced a new `HashMap` in the `TestLogger` but then did lookups by iterating the entire map. This fixes that, and also takes this opportunity to stop allocating new `String`s for the module to store each log entry in the `TestLogger`
973636bd2a