[Pharo-project] Transcript rant
richi.moran at gmail.com
Mon Apr 4 20:51:46 CEST 2011
On Mon, Apr 4, 2011 at 11:44 AM, Igor Stasenko <siguctua at gmail.com> wrote:
> In this respect an old implementation was much nicer in a sense that
> it could be replaced by different stream which responds to same
> But now, Transcript is a class, and its much harder to replace it and
> as to me it is too hardwired.
> Maybe this is good for Cuis, but as to me, i consider Transcript as a
> generic/default logging facility in smalltalk system.
> I was planning to redirect Transcript to write to stdout when in
> headless mode (and when VMs will provide stdio communication out of
> the box).
> But how i suppose to do it now? Hacking existing class? And then
> again, what if someone wants to redirect transcript to socket (and its
> easy to imagine where we may need that - suppose you working with
> remote image and want to see its transcript).
> So, hacking the same class again?
I'm probably missing the point but: why can't you do something like this:?
transcript := Smalltalk at: #Transcript.
Smalltalk at: #Transcript put: somethingElse.
Smalltalk at: #Transcript put: transcript.
> P.S. i know that maybe a preferable way to do logging is through 'self
> log:' protocol etc..
> but lets face reality: there are a tons of code in system which using
> Transcript. And i don't think that we will abandon it in nearest
> So, lets just keep it and make it more nicer, but lets separate concerns.
> Best regards,
> Igor Stasenko AKA sig.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-project