add conditional variable into logger