Hi Stef, The way I see it is that the Zinc Log Announcements will work quite well with Beacon, but less smooth with SystemLogger because you will need another layer of indirection. This is because SystemLogger is not relying directly on Announcements. I think the model of Beacon is simpler. Please note that I am not looking to start a war :). I am sure there are things I did not consider in Beacon, and this is why it would be great to work together to build a common engine that we can integrate in the image. Cheers, Doru On Mon, Jun 16, 2014 at 8:25 AM, stepharo <stepharo@free.fr> wrote:
Hi sven
Objects are the way to go. Will this compatible be with SystemLogger? I mean could not you use SystemLogger? Because I do not see them why I spend my time to build infrastructure.
Stef
Hi,
Since years, Zinc has been using its own Announcements-based logging mechanism for client and server logging. The payload of the Announcements used was still essentially text based though.
In some discussions months ago with Norbert Hartl in the context of his work on SystemLogger, the concept of pure object logging as an alternative to text based logging became an interesting alternative for me. In an internal project that I did earlier this year I tried out this concept for myself and was quite happy with the result.
Doru Girba had indicated several times to me that he was also interested in thinking about logging, so when he started talking about Beacon, I decided to write down my ideas a bit in a quick draft:
https://github.com/svenvc/docs/blob/master/draft/logging-with-objects.md
And to make this even clearer, I had to change Zinc logging to work along these principles. The current #bleedingEdge experimental/in-progress version of Zinc now contains a first working version of 'framework agnostic pure object logging'. The conversion is not yet finished - there is still much to learn here - but it already looks quite nice I think.
Monitoring logging output can be done by opening an Announcement Spy.
ZnNewLogEvent open.
Next you run some code (start a server, do one request, stop the server).
(ZnServer defaultOn: 1701) route: #server1; start.
ZnClient new clientId: #client1; beOneShot; get: 'http://localhost:1701/random'.
ZnServer stopDefault.
Which give the following output (using the standard string representation).
However, each line is a rich object containing tons of information. Here is the highlighted line in the Explorer.
As you can see, all information from during the client and the server's execution is preserved, ready to be used for logging and/or debugging, right now or later on.
Nowhere in the main ZnClient or ZnServer logging code is there simple string or text logging, everything being logged by announcing a log event object.
I hope that this plays well with both SystemLogger, Beacon and maybe other logging frameworks out there.
When I bring this approach more and more in production use, it will most probably evolve further. In the meantime, have a look: I would love feedback.
Sven
-- www.tudorgirba.com "Every thing has its own flow"