src/journal.c File Reference src/journal.c journal / log #include <stdio.h>#include <stdlib.h>#include <time.h>#include <string.h>#include <sys/time.h>#include "../include/fsm.h"Include dependency graph for journal.c: Functions void fsm_init_log (fsm_struct_journal *jj) init the journal void fsm__clear_log (fsm_struct_journal *jj, const char *file_source, const char *function_source, const char *string_value) usefulness ? (systematic ^c) void fsm_add_log (fsm_struct_journal *jj, const char *file_source, const char *function_source, const char *string_value) add an event long fsm_pop_back_log (fsm_struct_journal *jj, const char *file_source, const char *function_source, const char *string_value) remove an event int fsm_length_log (fsm_struct_journal jj) get journal_length void fsm_seek_log (fsm_struct_journal jj, long usec, const char *file_source, const char *function_source, const char *string_value) seek for an event void fsm_publish_log (fsm_struct_journal jj) publish all the logs today just print in the console TODO > in a file
Detailed Description journal / 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(&current_time));
Function Documentation
fsm__clear_log() fsm__clear_logjournal.c journal.cfsm__clear_log void fsm__clear_log (fsm_struct_journal * jj, const char * file_source, const char * function_source, const char * string_value) usefulness ? (systematic ^c) Since 2024-09 Parameters *jj *file_source *function_source *string_value
fsm_add_log() fsm_add_logjournal.c journal.cfsm_add_log void fsm_add_log (fsm_struct_journal * jj, const char * file_source, const char * function_source, const char * string_value) add an event Since 2024-09 Parameters *jj *file_source *function_source *string_value
Here is the caller graph for this function:
fsm_init_log() fsm_init_logjournal.c journal.cfsm_init_log void fsm_init_log (fsm_struct_journal * jj) init the journal Since 2024-09 Parameters *jj
Here is the caller graph for this function:
fsm_length_log() fsm_length_logjournal.c journal.cfsm_length_log int fsm_length_log (fsm_struct_journal jj) get journal_length Since 2024-09 Parameters *jj
Returns journal length
fsm_pop_back_log() fsm_pop_back_logjournal.c journal.cfsm_pop_back_log long fsm_pop_back_log (fsm_struct_journal * jj, const char * file_source, const char * function_source, const char * string_value) remove an event Since 2024-09 Parameters *jj *file_source *function_source *string_value
fsm_publish_log() fsm_publish_logjournal.c journal.cfsm_publish_log void fsm_publish_log (fsm_struct_journal jj) publish all the logs today just print in the console TODO > in a file Since 2024-09 Parameters *jj
Here is the caller graph for this function:
fsm_seek_log() fsm_seek_logjournal.c journal.cfsm_seek_log void fsm_seek_log (fsm_struct_journal jj, long usec, const char * file_source, const char * function_source, const char * string_value) seek for an event Since 2024-09 Parameters *jj usec *file_source *function_source *string_value