output the script line of a logging message

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

output the script line of a logging message

Bob Sneidar via use-livecode
I'm adding some logging function calls to a script. Is there a way to
include the line number of the current line in the script?

Some of the messages are pretty similar, if not identical, so it would be
helpful when reviewing the logs to identify the message by the line number
the function was on when it logged the message.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: output the script line of a logging message

Bob Sneidar via use-livecode
Look at the executionContexts in the dictionary. That should get you going on some ideas.

Bob S


> On Mar 13, 2017, at 11:12 , Matt Maier via use-livecode <[hidden email]> wrote:
>
> I'm adding some logging function calls to a script. Is there a way to
> include the line number of the current line in the script?
>
> Some of the messages are pretty similar, if not identical, so it would be
> helpful when reviewing the logs to identify the message by the line number
> the function was on when it logged the message.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: output the script line of a logging message

Bob Sneidar via use-livecode
On 03/13/2017 11:26 AM, Bob Sneidar via use-livecode wrote:
> Look at the executionContexts in the dictionary. That should get you going on some ideas.

...and in particular, item 3 of line -1 of the executioncontexts should
get you the last line number executed.

--
  Mark Wieder
  [hidden email]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode