refactor logging functions to only handle chatlog pointers
add prompt logging support
merge