[common] adds logging macros that only output stuff on rank0