moving logging utils to common.cpp