Global logging refactor and added file,line,function to logging