How to do logging (was Re: [squeak-dev] Files documentation)
Göran Krampe
goran at krampe.se
Thu Nov 27 10:39:38 UTC 2008
Hi again!
Mariano Martinez Peck wrote:
> Göran: Yesterday night we have a very good discussion about logging in
> IRC. I was asking about Logging in order to add log to SqueakDBX. I
> think there were some interesting questions:
>
> 1) Should a framework, like SqueakDBX, log? Or this is a responsibility
> of the "user" of the framework ?
I think it definitely should log. :)
> Here, I will say: I think framework must log because it helps the
> framework team to find out bugs or give them information about it. I
> think this is something good. Obviously the framework should only log
> things related to the framework itself and not logic related with the
> user of it.
Right.
> 2) If so, should it be optional ?
> I think i must. I mean, user can enable or disable it.
Yep.
> 3) Suppose I want very much performance, and the user disable logging.
> Which is the best way of doing this?
Good question. :) As Keith noted you can do tricks with subclasses etc.
I haven't bothered looking into disabling logging "the fastest way" much
for SimpleLog, and now since Keith has taken the "front seat" :) perhaps
that is now an issue more suitable to deal with in his "Logging" package.
> 4) No matter 1) to 3), framework's user can log. I mean, it can do
> something like [xxxx] on: DBXError do:[ self log 'something' ]
Right.
> In fact, I decided (actually I must discuss with the team) to use
> Logging and SimpleLog in SqueakDBX.
>
> Any opinion about this?
Just happy to hear it! :)
regards, Göran
More information about the Squeak-dev
mailing list
|