I haven't used postRender scripts, but I use prerender scripts frequently.
I use python to launch my batch renders - here is a python script that will launch a batch render and use the 'preRender' flag to source a MEL script.
The "print" statement in the Mel script will print to the log. I would think you could add and increment a var and use a postRender script to print it after each frame, but I haven't tried it. If it works, maybe you could replace Maya's bloated log with info that would actually be useful.
I have a more elegant solution for rendering w/Python and sourcing a Mel script, but it requires an extra external script, so I'm posting this for ease of explanation, hopefully you can get something useful out of it:
renderMe.py
'''
D:\MiscApps\Python26\python renderMe.py
'''
import os, glob, time, shutil
#############################################################
### VARS:
project = r'C:\Projects\3D'
startF = '1'
endF = '365'
imageName = '"Test_preRender\destFileName__"'
renderCam = 'audienceCam'
destPath = r'C:\Projects\Compositing'
scene2Render = r'C:\3D\scenes\aScene59.mb'
verbose = r' -v "5" '
preRndrCmd = r'"source \"D:/Software_stuff/Maya/Batch/preRenderScript\""'
print 'Start:' + time.strftime("%H:%M:%S", time.localtime())
print 'Render Components F'+ startF +' to F' + endF
os.system (' render -s ' + startF + ' -e ' + endF + ' -proj ' + project + ' -im ' + imageName + ' -r mr -cam ' + renderCam + ' -preRender ' + preRndrCmd + verbose + ' -log ./components59_rLog.log -rd ' + destPath + ' ' + scene2Render )
print 'Done:' + time.strftime("%H:%M:%S", time.localtime())
############################################################
preRenderScript.mel
// Turn off all display layers:
for ($obj in ls -type displayLayer
) {
setAttr ($obj+".v") 0;
}
// Build list of layers and set visibility:
string $compLyrs[] = {"A_lyr","B_lyr","c_lyr","Universe_lyr"};
for ($lyr in $compLyrs)
{
setAttr ($lyr+".v") 1;
}
// SET RENDERLAYERS:
// Turn off all render layers:
for ($rLyr in ls -type renderLayer
)
{
setAttr ($rLyr+".renderable") 0;
}
// Enable specific rLayrs for render
string $compRLyrs[] = {"ao","bty","RGBMatte","univ"};
for ($rLyr in $compRLyrs)
{
setAttr ($rLyr+".renderable") 1;
}
print "duh";