src/journal.c File Referencesrc/journal.cjournal / log #include <stdio.h>#include <stdlib.h>#include <time.h>#include <string.h>#include <sys/time.h>#include "../include/fsm.h"Functions void fsm_journal_init (fsm_struct_journal *jj)init the journal void fsm_journal_clear (fsm_struct_journal *jj, const char *file_source, const char *function_source, const char *string_value)usefulness ? (systematic ^c) void fsm_journal_push_front (fsm_struct_journal *jj, const char *file_source, const char *function_source, const char *string_value)add an event long fsm_journal_pop_back (fsm_struct_journal *jj, const char *file_source, const char *function_source, const char *string_value)remove an event int fsm_journal_length (fsm_struct_journal jj)get journal_length void fsm_journal_seek (fsm_struct_journal jj, long usec, const char *file_source, const char *function_source, const char *string_value)seek for an event void fsm_journal_publish (fsm_struct_journal jj)publish all the logs today just print in the console TODO > in a file Detailed Descriptionjournal / log This file is part of Gem-graph. The journal stores chronologically the events during a session run (rules exec, mainly)What types of events should be reported ? (fsm, widgets, ... ) For what purpose ? What information must be collected and transmitted ? How to name and classify this information ? How to present it ?date key (rank) source file source function +/- value(notes) time_t current_time = time(NULL); < Check if the time retrieval was successful if (current_time == ((time_t)-1)) printf("Error getting current time.\n"); Convert to local time format and print printf(" Current timestamp: %ld %s\n", current_time, message); printf(" Current time: %s", ctime(¤t_time)); Function Documentationfsm_journal_clear()fsm_journal_clearjournal.cjournal.cfsm_journal_clearvoid fsm_journal_clear (fsm_struct_journal * jj, const char * file_source, const char * function_source, const char * string_value)usefulness ? (systematic ^c) Since2024-09
Parameters
*jj*file_source*function_source*string_value
fsm_journal_init()fsm_journal_initjournal.cjournal.cfsm_journal_initvoid fsm_journal_init (fsm_struct_journal * jj)init the journal Since2024-09
Parameters
fsm_journal_publish()fsm_journal_publishjournal.cjournal.cfsm_journal_publishvoid fsm_journal_publish (fsm_struct_journal jj)publish all the logs today just print in the console TODO > in a file Since2024-09
Parameters