[mercury-users] Debug messages

Peter Ross pro at missioncriticalit.com
Fri Feb 18 03:24:30 AEDT 2005


Elmar Haneke wrote:

> Hi,
>
> how can I make my program output some trace-data without using the 
> io_state?
>
> For debugging pruposes it is very much more convenient to place an 
> 'print("Was here")' to some code where no IO-state is passed or IO is 
> not possible due to backtracking..
>
I've written a module which does log4j style logging in Mercury.

See 
http://www.cs.mu.oz.au/research/mercury/mailing-lists/mercury-users/mercury-users.200501/0014.html 


I've also included two predicates which can be used without the io.state.
    impure_log_f
    unsafe_log_f
which can be used in contexts where the io.state is unavailable.

The nice thing about this interface is that one can easily 
enable/disable logging in discrete parts of code.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list