1. elog.e *Update*
- Posted by "Lucius L. Hilley III" <lhilley at CDC.NET>
Jan 18, 2000
-
Last edited Jan 19, 2000
Easy to use logging routine.
Features:
only one command to call
number of last lines logged can be limited to a range.
I.E.: 100 to 200
logging can be easily turned on or off.
Log filename can be selected yet program.txt is automatically
used if none selected. program is the name of the executing
program that included elog.e
maintain routine embed depth with ">" and "<".
example usage:
include elog.e
elog_logging = 1 -- on (default setting)
elog_fname = "program.log" --not necessary
elog_min = 100 -- default setting is 0. (Off)
elog_max = 200 -- default setting is 0.
--elog_min in max refer to then number of lines saved to the log file.
--if min is not 0 then min is >= 10 also max is >= min + 100.
procedure recursing(integer i)
elog(sprintf(">recursing(%d)", i))
recursing(i - 1)
elog("<")
end procedure
recursing(5)
for A = 6 to 10 do
elog(sprintf("%d",A))
end for
for A = 11 to 15 do
elog(">")
elog(sprintf("<%d",A))
end for
for A = 16 to 20 do
elog(sprintf(">%d",A))
elog(sprintf("<%d",A))
end for
Lucius L. Hilley III
lhilley at cdc.net
+----------+--------------+--------------+
| Hollow | ICQ: 9638898 | AIM: LLHIII |
| Horse +--------------+--------------+
| Software | http://www.cdc.net/~lhilley |
+----------+-----------------------------+