[BIOSAL] Thorium - logging?

Boisvert, Sebastien boisvert at anl.gov
Tue Nov 25 09:35:56 CST 2014


> From: biosal-bounces at lists.cels.anl.gov [biosal-bounces at lists.cels.anl.gov] on behalf of George K. Thiruvathukal [gkt at cs.luc.edu]
> Sent: Tuesday, November 25, 2014 9:12 AM
> To: biosal at lists.cels.anl.gov
> Subject: [BIOSAL] Thorium - logging?
> 
> 
> 
> 
> Quick Thorium question...
> 
> 
> Is there any sort of logging framework for Thorium?

There are the LTTng tracepoints, and some "custom" tracepoints. LTTng is very useful to trace race conditions.

There are already instrumentation for events such as thorium_actor:receive_enter.


> Owing to a bit of a bug, I am suddenly seeing the need for a way to log distributed events (in example/application-oriented codes).

If the ordering of these distributed events is important, than LTTng is the tool to use in my opinion.

For any message that is received, there is a tracepoint event already instrumented.

> 
> 
> In the simplest form, something like a log(format, args) would do the trick. What I would like is some way to prefix the output with the actor name (number) so I could filter out various logging events.

In your case, I suppose that this could work for you:

thorium_actor_log(self, format, args);

example:

thorium_actor_log(self, "foo = %d bar= %d", 42, 99);

which would print

[LOG] 2014-11-24T21:14:29+00:00 my_cool_actor_script/1234 says: foo= 42 bar= 99

The first iteration of that would write to stdout, if that's all right with you.


> 
> 
> Best,
> George
> 
> 
> 
> 
> 
> George K. Thiruvathukal, PhD
> 
> Professor of Computer Science, Loyola University Chicago
> 
> Director, Center for Textual Studies and Digital Humanities
> Guest Faculty, Argonne National Laboratory, Math and Computer Science Division
> Editor in Chief, Computing in
>  Science and Engineering (IEEE CS/AIP)
> 
> (w) 
> thiruvathukal.com (v) 773.829.4872
> 
> 
> 
> 
> 
> 
> 
> 
> 


More information about the BIOSAL mailing list