LogClient published [SM] (was Re: LogClient)

Giovanni Giorgi jj at objectsroot.com
Wed May 14 18:48:16 UTC 2003


On Wednesday, May 14, 2003, at 03:38 PM, goran.krampe at bluefish.se wrote:

> Great!
>
> Really a little package worthy to be included in the "official" Squeak
> IMHO. We need a common mechanism for this.
If the guides want, I can mantain it with their supervision.
Who must I contact?


And now the good news:
  Logengine 1.0 is OUT!!
<http://map2.squeakfoundation.org/sm/packagebyname/LogEngine>
Please try it out and send me suggestions/bugs and so on,,,


A Sample usage is
lc := LogClient getInstance: 'Client'.
lc debug:'test1'.
lc info:'test2'.

When you create a LogClient, you must use the getInstance: method, 
passing a "Category Name"
used to create a special category log file.

LogClient features:
+ Integrated with Preferences (debug panel)
+ Can output on file and on Transcript on demand
+ Can print the method where the line is called
+ Can disable the debug level (only this for the meantime, sorry).
+ Easy to extend

Log format example and description:
13.May.2003-22:34:27 <D> RegressionTest2 test2 Printed first (LogTest 
class>>test1)
13.May.2003-22:34:27 <I> RegressionTest1  Info level (LogTest 
class>>test1)
13.May.2003-22:34:27 <E> RegressionTest1 Error level   (LogTest 
class>>test1)
-----------------------  ^^  ---------------   <-- Msg --->    
^^--Method where is invoked the log
    timestamp           ^^     \
			           ^^      Category Name
			           ^^
					Level:
                           D=Debug, I=Info, E=Error


-- 
    [   [  [ JJ ]  ]   ]  | Wondering whether a machine can think is
                          | like asking if a submarine can swim.
http://www.siforge.org   |  -- From someone's .sig



More information about the Squeak-dev mailing list