I like the idea of something simple and possibly built-in. However, would it be possible to implement as a function that wraps definitions with a redef and adds the logging?
http://software-lab.de/doc/refR.html#redef On Tue, Feb 25, 2014 at 9:20 AM, Henrik Sarvell <hsarv...@gmail.com> wrote: > Sometimes it's also nice to be able to get everything in a file, not > just printed, would be nice if it could have that option. > > On Tue, Feb 25, 2014 at 6:50 PM, Thorsten Jolitz <tjol...@gmail.com> > wrote: > > > > Hi List, > > > > sometimes I start putting a lot of (maybe too many) 'msg calls in my > > code for debugging purposes, what then triggers memories of logging > > frameworks for Java I once read about. > > > > Would it make sense to add such a logging framework to the language as a > > kind of third debugging tool (besides trace and debug)? I was thinking > > about something along the line of > > > > - a new global variable *Log > > - two new functions 'log and 'unlog > > - an equivalent to ! as debugging breakpoint (e.g. § or whatever as > > logging point) > > > > *Log would then be NIL or one of several logging levels > > (e.g. 1,2,3). (log func) would then put § before all expressions of a > > function, (unlog func) remove them. Depending on the logging level, § > > would do nothing or, e.g., print the expression and the results of > > what (e) and (d) do during debugging, and maybe all variables with > > their actual values in that expression. > > > > What do you think? > > > > -- > > cheers, > > Thorsten > > > > -- > > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe >