fix bug printf to stdout when log_switch is off