script: log the weston output and add an option to specify the socket number