We need to start investigating good logging support.
NOTES:
1) Log to the VFS so we can use any target supported
by it. This may introduce a problem as some protocols
can't complete a file until it has been finished. Depending
on the log target, e.g. HTTP, this may cause the log to
be lost in the event of failure as the request cannot be
sent until the body content is complete
2) Consider how to handle common logging ideas without
having to insert too much explicit logging code. e.g.
specific function entry/exit and associated arguments
and return values
3) Consider supporting logging as core syntax, by that I
mean allow MillScript to optimise away any unused
logging methods, so they don't even get past the Expr
stage.
Logged In: YES
user_id=934534
e.g. logProceedureEntry( Function ) would start logging all use
of the argument. we could have a batch of functions, e.g.
logFunctionEntryAndExit - shorthand for entry & exit
logFunctionEntry - log use of function and it's arguments
logFunctionExit - log function exit and it's return values
logEveryFunctionEntry - log every function entry
logEveryFunctionExit - log every function exit
These methods could take a boolean to indicate if they should
also log arguments and return values as appropriate.
Maybe this could lead into a more general aspect style of
programming. e.g. onFunctionEntry( Function, Expr ) would
execute the expression on entry to the specified function?