What have you tried with redirection? I think you might get it working with something like this:-
#!/bin/bash
HOST=ftp.example.com
USER=ftpuser
PASSWORD=P@ssw0rd
logfile=/path/to/logs/filename.$$
ftp -inv $HOST <<EOF > $logfile
user $USER $PASSWORD
cd /path/to/file
mput *.html
bye
EOF
Using $$ in the filename appends the PID, so fairly random to avoid overwriting.
You could choose a fixed log file and append to it by using >> $logfile or you could use a date/timestamp like one of these:-
logfile="/path/to/logs/filename.$(date +%Y%m%d_%T)" # Time stamp is YYYYMoDD_HH:Mi:SS
logfile="/path/to/logs/filename.$(date +%s)" # Time is in seconds from the Epoch
logfile="/path/to/logs/filename.$(date +%s.%N)" # Time is in nano seconds from the Epoch
Some of the date flags might be OS dependant though.