inline logger for cpp