Define flush to logger to work like IO