help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Print object name and method name in log statements


From: Dmitry Matveev
Subject: Re: [Help-smalltalk] Print object name and method name in log statements
Date: Wed, 4 Feb 2015 08:31:49 +0400

Hi Stephen,

I am not sure about the line number, but you can always use "self class
name" and something of thisContext (i.e. "thisContext printString") to get
the stack frame details.
If your objects have special (personal) names, it is up to you to implement
the appropriate accessor methods (or a protocol).

With best regards,
Dmitry

2015-02-04 4:06 GMT+03:00 Stephen Woolerton <address@hidden>:

> Hi,
>
> Is there a way to access the name of the current Object, and name of the
> current method, when a program is running? And if so, is line number
> accessible too?
>
> I would like this information for logging statements, as a prefix to the
> log text.
>
> Thanks
> Stephen
>
>
>
> _______________________________________________
> help-smalltalk mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-smalltalk
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]