[squeak-dev] squeak logging package(s)

Robert Withers robert.withers at pm.me
Sat Jul 11 07:38:24 UTC 2020

Hi tim,

On 7/10/20 4:11 PM, tim Rowledge wrote:
> On 2020-07-10, at 12:44 PM, Robert Withers via Squeak-dev 
> <squeak-dev at lists.squeakfoundation.org> wrote:
>> I would take this opportunity to point out the TraceMonitor [1] package in Cryptography.
> That looks interesting, and since I am already loading the cryptography package it will be easy to just include. I'll see how it goes!

Super! I realized it wasn't where it should be, functionally. So I 
published a new version 'TraceMonitor-rww.2.mcz'. I am now initializing 
with a Transcript stream, but able to add multiple steams; Internally 
the monitor writes to a CompositeStream, able to hold multiple streams.

Here we have a Transcript stream, by default, and a file stream.

     | monitor |
     monitor := TraceMonitor newNick: 'TestingMonitor'.
     monitor openTraceStreamNamed: 'traceMonitor.log'.

Calling #etrace:msg: in an object who is being monitored by this 
monitor, will result in the event written to both the Transcript and the 
file named 'traceMonitor.log'.

Unfortunately, I am not making any assertions in the TestCase, which is 
more of an ExampleCase. If you will define your own domains, a test 
example of etraceing with that domain could be built and output 
verified, visually or assertively.

K, r

More information about the Squeak-dev mailing list