Write all output to a text file at the end...In your Python script have every message written to a master string, like so:
masterString = ''
# some geoprocessing on dataset
str_gp1_success = 'Completed GP1 on: %s' % dataset
arcpy.AddMessage(str_gp1_success)
masterString += '\n'+str_gp1_success # append the new string to the master, with a new line...
Do this kind of thing at every message, then at the end, save it to a plain text file (the file name and location can be an input parameter if you want):
outputFile = 'C:\\Temp\\output.txt'
w = open(outputFile,'w') # open file buffer - the second argument, w, tells it to open for writing
w.write(masterString)
w.close()
If you want to get fancy you can check for and delete the output file first, if it exists:outputFile = 'C:\\Temp\\output.txt'
if os.path.exists(outputFile ): # write to file...
os.remove(outputFile )
print 'Deleted; %s' % outputFile
w = open(outputFile,'w') # open file buffer - the second argument, w, tells it to open for writing
w.write(masterString)
w.close()