Q: logging in realtime
From: Vasilis Margioulas (vasilism_at_hotmail.com)
Date: 04/14/04
- Next message: Tayssir John Gabbour: "Re: scheme seems neater"
- Previous message: Joe Marshall: "Re: How many functions do you know?"
- Next in thread: Rolf Rander Nęss: "Re: Q: logging in realtime"
- Reply: Rolf Rander Nęss: "Re: Q: logging in realtime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 14 Apr 2004 03:06:15 -0700
Hi all.
What i want to do is to log some trace massages when *trace-enabled*
flag is set to t.
Due to real time requirements when *trace-enabled* is set to nil
trace code must not be present in function definition.
My aproach is the following:
(defmacro def-some-function ()
`(defun some-function (arg)
,(if *trace-enabled*
`(progn
(log-to-file *trace-file* (format nil "~A" arg))
arg)
'arg)))
changing *trace-enabled* to t and reevaluating (def-some-function) take
the desired behavior but the code to support this is not so clean
Any better ideas?
Thanks in advance.
- Next message: Tayssir John Gabbour: "Re: scheme seems neater"
- Previous message: Joe Marshall: "Re: How many functions do you know?"
- Next in thread: Rolf Rander Nęss: "Re: Q: logging in realtime"
- Reply: Rolf Rander Nęss: "Re: Q: logging in realtime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]