[Seaside] Question on using Toothpick - the logging tool

Philippe Marschall philippe.marschall at gmail.com
Sat Mar 29 06:20:53 UTC 2008

2008/3/29, Squeaker <squeakman at gmail.com>:
> I using Toothpick (for the first time) to do my logging.  I am using the
> FileLogger and what I want to do is to log all messages to a file.
>  What I observe is that only the last log message is written to the file (in
> the Windows world). A bit of browsing the code reveals that the stream
> pointer is not set to the end of the file.
>  I "fixed" the method FileLogger>>flush to be as follows:
>  1 flush
>  2       buffer position == 0 ifFalse: [
>  3               mutex critical: [
>  4                       self stream setToEnd;
>  5                               nextPutAll: buffer contents;
>  6                               flush;
>  7                               close.
>  8                       buffer reset]]
>  with me adding the "setToEnd;" on line 4.
>  When I tested this change it does what I want and logs all messages to the
> file.
>  My question: is this a proper fix or have I missed something?

You're not the first with this problem and unfortunately this is not
the only problem the Squeak port of Toothpick has (one of the reasons
why we don't use it for Seaside). At least on squeak-dev people never
seemed to get a response. Maybe you're more lucky on this list or if
you try to contact the author directly  [1]  [2].

 [1] http://www.metaprog.com/Toothpick/
 [2] http://www.squeaksource.com/Toothpick.html


More information about the seaside mailing list