I use IanM's Matrix1 plugin for this activity (and many more) and it really is as simple.
My current project is set up like this...
DebugSetup:
Logfile$="DebugLog.html"
` Open the log file
if file exist(Logfile$) then delete file Logfile$
OPEN LOG Logfile$, 1
` Enable logging against a tag even if the tag is unknown
SET LOG UNKNOWN TAG 1
` Set up the severity tags
SET LOG TAG 0, "<font color=#000000>", "</font><br>" : rem this is the INFO level
SET LOG TAG 1, "<font color=#0000ff>", "</font><br>": rem NOTICE level
SET LOG TAG 2, "<font color=#808080>", "</font><br>": rem WARN level
SET LOG TAG 3, "<font color=#ff8080>", "</font><br>": rem ERROR level
SET LOG TAG 4, "<font color=#ff0000>", "</font><br>": rem DISASTER level
` Write out a html header
WRITELN LOG "<html><body>"
` Write out log details with various parameters
debugOutput(LOGNOTICE,"Logging started")
return
function DebugOutput(level as integer, message as string)
date$ = GetSystemRealDate()
time$ = get time$()
msg$ = date$ + " " + time$ + " " + message
WRITELN LOG level, msg$
endfunction
...and I write to the log file like this...
debugoutput(LOGINFO,"Body part ")
As you can see I prefer to output the logfile as HTML but you can just as easily choose plain text.
Hope this helps,
Steve.
Marriage is a circle of rings....
Engagement ring, Wedding ring, Suffering!