This looks like a place to start..
Code:
quest::write("InstanceLogs/$TYPE$space$InstanceName$space$ZoneSN.txt","[$timestamp] : $name has created instance $zoneln");
I'm not familiar enough with all of the #commands to know which might help..if there is one...