updating logging function again because backtrace is different from cli to mod_php