Object-oriented state-frozen logging

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Object-oriented state-frozen logging

Peter Uhnak
Hi,

this may be a bit tall order and I am not sure if possible,
however I would like to know the state of objects at certain points.

Currently what I would do is something like 
self log: 'anObject someProperty:'; logCr: anObject someProperty.

however this is not very practical.

So I would like something like
self fronzenLog: anObject

and then I could inspect the logger and see the state of the whole objects.

Using debugger and stepping through it is not really practical because I need to observe several possible objects that are in this function at very different times.

Is this possible? Is there a better/somewhat better way to do something like this?

Any pointers appreciated.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Object-oriented state-frozen logging

Sven Van Caekenberghe-2
Hi Peter,

I would call this object logging, plain and simple.

Some of us, myself included, believe this is the way forward.

You could have a look at how Zinc does logging (ZnLogEvent):

 https://www.youtube.com/watch?v=rIBbeMdFCys
 https://www.youtube.com/watch?v=gaUxPNq6_7c

This article might also help:

 https://medium.com/concerning-pharo/lampsort-revisited-visualised-6652055ef858

All in all, it is not too much effort to generate log event objects, and they can used in many different ways. Using Announcement makes this quite practical.

HTH,

Sven

> On 05 Apr 2015, at 20:16, Peter Uhnák <[hidden email]> wrote:
>
> Hi,
>
> this may be a bit tall order and I am not sure if possible,
> however I would like to know the state of objects at certain points.
>
> Currently what I would do is something like
> self log: 'anObject someProperty:'; logCr: anObject someProperty.
>
> however this is not very practical.
>
> So I would like something like
> self fronzenLog: anObject
>
> and then I could inspect the logger and see the state of the whole objects.
>
> Using debugger and stepping through it is not really practical because I need to observe several possible objects that are in this function at very different times.
>
> Is this possible? Is there a better/somewhat better way to do something like this?
>
> Any pointers appreciated.
>
> Peter


Reply | Threaded
Open this post in threaded view
|

Re: Object-oriented state-frozen logging

Peter Uhnak
Hi Sven,

thanks for the answers; especially the article was very informative. I didn't even think of using Announcements, but seeing it in action is really cool!

Peter

On Sun, Apr 5, 2015 at 8:30 PM, Sven Van Caekenberghe <[hidden email]> wrote:
Hi Peter,

I would call this object logging, plain and simple.

Some of us, myself included, believe this is the way forward.

You could have a look at how Zinc does logging (ZnLogEvent):

 https://www.youtube.com/watch?v=rIBbeMdFCys
 https://www.youtube.com/watch?v=gaUxPNq6_7c

This article might also help:

 https://medium.com/concerning-pharo/lampsort-revisited-visualised-6652055ef858

All in all, it is not too much effort to generate log event objects, and they can used in many different ways. Using Announcement makes this quite practical.

HTH,

Sven

> On 05 Apr 2015, at 20:16, Peter Uhnák <[hidden email]> wrote:
>
> Hi,
>
> this may be a bit tall order and I am not sure if possible,
> however I would like to know the state of objects at certain points.
>
> Currently what I would do is something like
> self log: 'anObject someProperty:'; logCr: anObject someProperty.
>
> however this is not very practical.
>
> So I would like something like
> self fronzenLog: anObject
>
> and then I could inspect the logger and see the state of the whole objects.
>
> Using debugger and stepping through it is not really practical because I need to observe several possible objects that are in this function at very different times.
>
> Is this possible? Is there a better/somewhat better way to do something like this?
>
> Any pointers appreciated.
>
> Peter



Reply | Threaded
Open this post in threaded view
|

Re: Object-oriented state-frozen logging

Tudor Girba-2
You can also take a look at Beacon:

But, also at SystemLogger:

Cheers,
Doru


On Mon, Apr 6, 2015 at 2:00 AM, Peter Uhnák <[hidden email]> wrote:
Hi Sven,

thanks for the answers; especially the article was very informative. I didn't even think of using Announcements, but seeing it in action is really cool!

Peter

On Sun, Apr 5, 2015 at 8:30 PM, Sven Van Caekenberghe <[hidden email]> wrote:
Hi Peter,

I would call this object logging, plain and simple.

Some of us, myself included, believe this is the way forward.

You could have a look at how Zinc does logging (ZnLogEvent):

 https://www.youtube.com/watch?v=rIBbeMdFCys
 https://www.youtube.com/watch?v=gaUxPNq6_7c

This article might also help:

 https://medium.com/concerning-pharo/lampsort-revisited-visualised-6652055ef858

All in all, it is not too much effort to generate log event objects, and they can used in many different ways. Using Announcement makes this quite practical.

HTH,

Sven

> On 05 Apr 2015, at 20:16, Peter Uhnák <[hidden email]> wrote:
>
> Hi,
>
> this may be a bit tall order and I am not sure if possible,
> however I would like to know the state of objects at certain points.
>
> Currently what I would do is something like
> self log: 'anObject someProperty:'; logCr: anObject someProperty.
>
> however this is not very practical.
>
> So I would like something like
> self fronzenLog: anObject
>
> and then I could inspect the logger and see the state of the whole objects.
>
> Using debugger and stepping through it is not really practical because I need to observe several possible objects that are in this function at very different times.
>
> Is this possible? Is there a better/somewhat better way to do something like this?
>
> Any pointers appreciated.
>
> Peter






--

"Every thing has its own flow"