[gcompris-devel] Log Module for gcompris

stasZ stas at linux.isbeter.nl
Tue Jan 20 01:43:01 UTC 2004


On 2004.01.20 01:11, Bruno Coudoin wrote:
         ^^^^^^^^^^
When do you sleep? :)
> 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.

> 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"
 
> 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.
 
> 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.

My suggestion of the fields:
applicationname,date,starttime,host,user,level,number of excercise, 
result,endtime,comment,misc;


Stas Z

"There are only 10 types of people in this world:
 Those who understand binary, and those who don't."
 




More information about the Gcompris-devel mailing list