Global logging
Fix build, printf log formatting
Logging refactor and added file,line,function to logging