How to get Info Editor logs with Python API

I want to get the log of the last used commands from the Info window, or anywhere else, if there’s another way.

I found this answer How do I get the Info window’s log text with Python?, but apparently Blender’s current version doesn’t have bpy.ops.ui.reports_to_textblock() anymore, so I’m kind of lost now.