[Issue 10143] New: only use logfile in server mode