How to have a shell script write a log file with a function - Aix

This is a discussion on How to have a shell script write a log file with a function - Aix ; I have a schell script that runs continously on an AIX system. It is
actually started from another shell script with the "ksh -x" command
and then I just write the output to a log file. This causes the log
...

How to have a shell script write a log file with a function

I have a schell script that runs continously on an AIX system. It is
actually started from another shell script with the "ksh -x" command
and then I just write the output to a log file. This causes the log
files to be filled with mostly useless information. I would like to
modify this script to create its own log file internally and then be
able to just have it log select acitivity. The script looks like:

....the log file should just have a variable declared about the logfile
name and path. Is there a way to create a function to write the log
entry and then I could just call the function and hand it a parameter
that would be the log entry? Say something like "LOG(0002 processed at
11-11-06/12:00)"?