[gcompris-devel] Log Module for gcompris

Bruno Coudoin bruno.coudoin at free.fr
Tue Jan 20 16:23:01 UTC 2004


Le mar 20/01/2004 à 10:41, stasZ a écrit :
> On 2004.01.20 01:11, Bruno Coudoin wrote:
>          ^^^^^^^^^^
> When do you sleep? :)

Hum, I should not write my mail from within gcompris. There maybe a bug
in the clock activity ;)

> > I just commited the first implementation of the traces in gcompris.
> > The log is written to a file named .gcompris.log in the home
> > directory.
> > 
> > The API is:
> > 
> > Only gcompris_log_set_reason is generaly needed for boards. In fact,
> > start and end are managed by gcompris core. For the end, it relies on
> > the bonus API so the boards that do not use it
> > 
> > /* gcompris internal only */
> > void gcompris_log_start (GcomprisBoard *gcomprisBoard);
> > 
> > /* Use it to tell the teacher where the kid failed */
> > void gcompris_log_set_reason (GcomprisBoard *gcomprisBoard, gchar
> > *comment);
> > 
> > /* Do not use it if you use the bonus API in your board */
> > void gcompris_log_end (GcomprisBoard *gcomprisBoard, gchar *status);
> > 
> > Here is an example of a failed log in reading
> > mar jan 20 00:38:12 CET
> > 2004,bruno.maison,bcoudoin,readingv,1,1,FAILED,14.000000,The word to
> > find was 'vit'
> >
> > Stasz, on your side, what do you think of it. Is this ok for
> > childsplay
> > or we need something else.
> 
> That seems ok to me, i suggest that we use this format and descripe it.
> I mean let's use it as a csl (comma seperate list) and descripe what  
> each field represent, the seperator between two lines could be a ; .
> The big advantage (IMHO) is that we can create some sort of standard  
> which is simple and human readable, also it makes it simple for the  
> teacher to import this csl log in any spreadsheet program and do the
> format themselfs.
> 
OK for the ;
Later we could have utilities to go from our format to some speadsheet.

> > I though we could at the application name in the format so that if we
> > want to have a share single trace file on a host, it would work.
> 
> That's important indeed, must also be a part of the "standard"

OK.

I have documented this at:
http://www.ofset.org/wiki/index.php/GcomprisLogFormat

>  
> > Next, I will look at a simple trace viewer. Basically, I think of a
> > table in which you can filter. It should be enough for a teacher to
> > find
> > it's kids results. A button will let him reset the log when think
> > becomes too old and huge.
> 
> Agree, besides my suggestion to use a spreadsheet, we can easily make a
> simple viewer in Python/TK which is part of almost every platform, and
> don't enforce platform dependent dependencies.
>  
Agree.

> > I don't plan to work on XML, OO.org or remote sharing of this trace
> > for
> > now. Let's go step by step and see if we really meet our users with
> > this
> > feature.
> 
> Agree, i think that your comma separation is the form we should use.
> 
> The first thing we should do before anything else is agree on the  
> format of the logs and the description of the fields.
> 
Yes, see the wiki now.

> My suggestion of the fields:
> applicationname,date,starttime,host,user,level,number of excercise, 
> result,endtime,comment,misc;
> 
I prefer to replace endtime by duration or usedtime. It's sometimes hard
to make time substraction by reading. We keep the starttime so that we
have still the information.
I prefer to have the date first but that's not important. If we combine
two traces, we expect to have them sorted by date fist so it the key for
me.
What do you call number of exercise ? I use in gcompris level/sublevel.
OK, I see your point. You want the teacher to know how many exercice
there is to see if the kid completed the level.
It will be harder for gcompris because of the sublevel concept. I have
to think more about it.
Last, what is misc for. Why comment not enough ?

Bruno.






More information about the Gcompris-devel mailing list