Creating Log files from Scripts

Hi

I would like to create a log file to track the execution of my script.
Example, if there were any errors, if it passed or failed etc.

How do I go about doing this.

My log file will be saved to this location: /var/log/import.log

How do I specify the directory?

I have been using something like this from another script but I don't understand it too well.

 
if [ -e ${dsxpids}$module.pid ] 
  then
  dsxlog $reverb --warning --module="$module" " pid = $$ : Is already   running"

  true;
else
  dsxlog $reverb --info --module="$module" "Now processing pid = $$"
fi

can u please help.

Thank u

you should post the contents of the log file and tell us what action you want to take from those.

e.g what is the identification for pass, fail or error etc.