Dual output (stdout and file)

Hello everybody,

Is there a more elegant way to make dual output (display on standard output and append to a file) while I'm executing a shell script, besides duplicating the echo command for every string?

echo "Message..." > 1
echo "Message..." >> myfile.out

Thank you for your time,
Adrian

echo "message...." | tee -a myfile.out
#!/bin/ksh

LOG_FILE=/tmp/${0##*/}.log

LogMsg() {

 #Redirecting the Output just to the Log file.
 #print "$@:$(date +%d/%m/%y:%H:%M:%S)"  >> $LOG_FILE

 #Redirection to stdout and file.
 print "$@:$(date +%d/%m/%y:%H:%M:%S)"  | tee -a $LOG_FILE
}

CallB() {
 LogMsg "Entering CallB routine"
}

Main() {
 LogMsg "Entering the function"
 CallB
}

#Call the Main Function here.
 Main

Just in case in future after having tested code you may have to remove logging,using the above approach you have just haveto change the LOG_FILE=/dev/null or LogMsg function.

Pls comment of the above approach.

Thanks
Nagarajan Ganesan.