Renamed and extracted from LogQueue's inner class.