Norbert Hartl wrote:

Am 16.06.2014 um 09:15 schrieb Sven Van Caekenberghe <[email protected]>:


On 16 Jun 2014, at 08:25, stepharo <[email protected]> wrote:

Hi sven

Objects are the way to go.

Yes !

Will this compatible be with SystemLogger? I mean could not you use SystemLogger?

I hope that SystemLogger can work with a subsystem that generates a stream of log objects, without requiring them to be subclasses of something. If so, then it will be compatible (just connect the announcer to where you want to sent the objects to). If not, then I don't understand how SystemLogger can be a pure object log.

I said this before (and I miss this in the SystemLogger documentation, and even in the Beacon description): show real object based logging from the beginning, not degenerate string logging.

In the case of SystemLogger, the class BasicLog already contains a message, why ? The API is also still mainly expressed with strings. (BTW, there should not be a messageText in exception, for example, being an instance of ZeroDivide or KeyNotFound with a key says it all).

This is somethings that bugged me for a long time. The message instVar in BasicLog has probably a misleading name. The message is suppsoed to contain any object not just a string. BasicLog and Log are not supposed to be subclassed if you haven’t special needs. BasicLog has two instVars: a timestamp and a message object. It acts as a decorator for any object you like to log. Therefor we have

Object>>#asLog
^ self class newLog message: self 

A small thing. I wonder if "message" is the right keyword.  For me it implies text-ness, which might encourage people to fall back to text by default.  An alternative that might be worth considering is "concern."  Here are some relevant dictionary extracts...
* A matter that engages a person's attention, interest, or care [1]
* Important relation or bearing: e.g. "This news is of concern to all of us." [1]
* To relate to :  be about e.g. "The novel concerns three soldiers" [2]
* At 18:24 we were concerned about LoggedObject. [my own log based example].

[1] http://dictionary.reference.com/browse/concern
[2] http://www.merriam-webster.com/dictionary/concern

cheers -ben

Reply via email to