help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Logging facility for GNU-smalltalk


From: Stefan Schmiedl
Subject: Re: [Help-smalltalk] Logging facility for GNU-smalltalk
Date: Wed, 8 Jul 2009 23:58:20 +0200

On Wed, 8 Jul 2009 23:38:29 +0200
Paolo Bonzini <address@hidden> wrote:

> > For the SUnit-tests, I thought of writing to a log-file and control
> > the entries afterwards, would that be okay?
> 
> That, or maybe you can pass an arbitrary stream?

Not maybe, definitely! 

Logging should always go to a stream and not be hardwired to
assume files. Let the user decide what he wants to do with the
logging data.

And it is much easier to test:

logger logSomething: 'whatever'.
logger logStream contents == 'whatever'

You don't want to test that reading and writing a file works,
that's Paolo's job :-)

Also, one could implement a "tee" like functionality, i.e.
duplicating the log output on both stdout and a file. Or even
piping it (eg via nc) to a remote location.


> 
> Paolo
> 
> 
> _______________________________________________
> help-smalltalk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-smalltalk
> 


-- 
Stefan Schmiedl
EDV-Beratung Schmiedl, Berghangstr. 5, D-93413 Cham
im Büro: 09971 9966 989, am Handy: 0160 9981 6278




reply via email to

[Prev in Thread] Current Thread [Next in Thread]