Write log file for SFTP command

Hi

I am transferring files to SFTP Server using sftp command(below), and want to write log file of this activity. Can you please advise if i am doing wrong.

sftp -v -oIdentityFile=/home/bbm_user/bbm/private_open_ssh.ppm umf-sftp@bbm-prod-send.com <<EOF
put $local_path/*.gz $remote_path/
>$log_path/$log_file_name

Thanks in advance.

That sftp command is incomplete and syntactically incorrect. This might be better:

sftp -v -oIdentityFile=/home/bbm_user/bbm/private_open_ssh.ppm umf-sftp@bbm-prod-send.com >$log_path/$log_file_name  <<EOF
put $local_path/*.gz $remote_path/
EOF

Thanks Rudic

i want to make this as solved, can someone advise how to do this? i tried finding the tags, but could find it

Up at the top where it says 'tags', click 'edit tags' to edit tags. I will add 'solved' for you.