[m-dev.] logging proposal
Ian MacLarty
maclarty at cs.mu.OZ.AU
Mon Feb 27 21:31:16 AEDT 2006
Hi,
As a result of the recent discussion about how to trick Mercury into not
optimising away logging calls, I am proposing the following simple
solution:
We add a special procedure `log' to the builtin module. The new
procedure takes a string as input (or possibly an I/O closure). The
compiler is then modified to treat calls to log as being the same as
true, unless an "--enable-logging" options is given. If this option is
given then the logging predicates write their output somewhere (where
they write their output could be given by another mmc option).
What are the feelings on introducing such a scheme? Clearly some kind
of logging feature is necessary, especially for very long running
programs that would be too slow in debugging grades. Also it would be
better that user's could add a logging mechanism to their code without
tricking and/or lying to the compiler.
We could also have different levels of logging.
Ian.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list