Fix #1263: log formatting for external commands