LogTool Spec (was Re: Log Tools needed? ;) )

Giovanni Giorgi jj at objectsroot.com
Sat May 3 20:22:58 UTC 2003


On Saturday, May 3, 2003, at 06:09 PM, Michael Rueger wrote:

> Giovanni Giorgi wrote:
>
>> I have found some strange "log" methods on the Object class, but they 
>> seems disabled or marked are "dangerous".
>> Someone can help?
> These "strange" log messages are from the attached package I did quite 
> a while ago. It's not thread safe at all BTW...
> Actually it would be a good idea to remove the two methods and the 
> calls in HTTPLoader, nobody is using them anyways.
> Oh, and log tools would be a good idea, that's why I wrote mine in the 
> first place :-)
Ok!
I will write a small log engine and publish it in the SqueakMap.
I write here the spec, so other people can suggests ideas and so on:

+ Log will have 4 level: debug/info/warn/error
+ Can be defined categories (as log4j) for having different logs
+ Debug level can be dynamically turned on and off using Preferences.
+ Logs can be written to disk (Preference option turn this on or off). 
The logs will be collectend in a directory called "logs", created if 
necessary

In the future release, debug level can be turned on/off not globally 
but per-category basis; you will also be able to specify the log 
directory and so on...
The first version will be compact and easy to use (only 2/3 classes 
with preference integration).
API would be similar to that of log4j.

The classes will be named Logger and will help also debugging the 
headless images...

Some  hints/ideas?
Ciao!
-- 
    [   [  [ JJ ]  ]   ]  | Il mio gatto non e' in bianco e nero,
                          | e' a colori.
http://www.siforge.org   |          JJ Rotating signatures....



More information about the Squeak-dev mailing list