How do I get the Info window's log text with Python?
Reports to text block operator bpy.ops.ui.reports_to_textblock() .

The operator bpy.ops.ui.reports_to_textblock()  lists reports from the info area



into a text block named "Recent Reports"([.nnn] if run more than once.)



Test code. Removes existing recent reports before running operator.

#remove other Recent Reports
reports = [bpy.data.texts.remove(t, do_unlink=True) 
           for t in bpy.data.texts
           if t.name.startswith("Recent Reports")]
# make a report
bpy.ops.ui.reports_to_textblock()
# print the report
for line in bpy.data.texts["Recent Reports"].lines:
    # if line.body.startswith("Operator:"): #it's an operator
    print(line.body)