Adds ajax call to append/create log
Adds log to main query