add logger for a script.