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.
The latter passes data on to a Log display component, in which actual realisations appear in bold.
----
enjoy
Keith
___________________________________________________________ Try the all-new Yahoo! Mail. "The New Version is radically easier to use" The Wall Street Journal http://uk.docs.yahoo.com/nowyoucan.html
*Example log:
Magma Log *entries: show read strategy ------------------------------------------------------------------------ *Read strategy: * *MagmaCollection* : 99->nil *Timespan* : 99->nil *Time* : 99->nil *Duration* : 99->nil *Color* : 99->nil *MaRootAnchor* : 1->nil *MaClassDefinition* : 99->nil *DateAndTime* : 99->nil *Morph* : 99->nil *Point* : 99->nil *Collection* : 1->nil *TimeZone* : 99->nil *Project* : 99->nil ------------------------------------------------------------------------
n: [ms] (current/min/newMin) class-attribute = value *1: [0] (1/1/2) MaRootAnchor-root = a PRMagmaRepository* 2: [0] (2/2) PRMagmaRepository-store = a Dictionary('Squeak'->a PRMagmaPersiste...etc... *3: [0] (1/1/2) MaRootAnchor-definition = a MagmaRepositoryDefinition * 4: [0] (2/2) MagmaRepositoryDefinition-magmaId = a MagmaId uuid = 105 249 56 137 184 20...etc... 5: [1] (2/2) MagmaRepositoryDefinition-attributes = a Dictionary() 6: [1] (2/2) MagmaRepositoryDefinition-classDefinitions = a Dictionary(size 105) 7: [1] (2/2) MagmaRepositoryDefinition-allLargeCollections = a Set() 8: [1] (2/2) MagmaRepositoryDefinition-codeBase = a MagmaRepositoryCodeBase *9: [1] (1/1/2) MaRootAnchor-stats = an OrderedCollection()* *10: [1] (2/2/3) OrderedCollection-array = #(nil nil nil nil nil nil nil nil nil ni...etc...*
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
magma@lists.squeakfoundation.org