Hi Keith and all!
Keith Hodges keith_hodges@yahoo.co.uk wrote:
Name: Magma seaside-kph.35 Author: kph Time: 20 September 2006, 4:26:16 pm UUID: c03eaa19-d628-4641-8587-f286615e3a4d Ancestors: Magma seaside-kph.31
Added Logging!
Tweaked (polite term for hack) the users of MaReadStrategy to pass more information over into MaReadStrategy, and to make MaReadStrategy entirely responsible for deciding whether a read actually happens or not.
This will enable more elaborate read strategy decisions to be concocted in user specialisations of MaReadStrategy.
We now have 2, WAMagmaReadStrategyDefault and WAMagmaReadStrategyLogged.
Interesting. I am just about to start seriously playing with readstrategies after stumbling a bit on my shared session scheme.
The latter passes data on to a Log display component, in which actual realisations appear in bold.
In Gjallar there is a logging library (4 classes IIRC) which is pretty neat. It follows the syslog levels (RFC31364, http://www.faqs.org/rfcs/rfc3164.html) and has a file and a Morphic backend. Would be nice to add a UDP syslog backend too.
Logging is simply done using:
Q2Log info: 'blabla'
...for the "info" level, and so on. It timestamps and plays with thisContext to figure out a "sender" - or you can supply it manually. Then there is a really neat Morphic UI for it which can filter on levels and senders etc, Magnus wrote it.
We intend to publish this logging lib separately, but just haven't had the time yet.
regards, Göran