Add a function to set the logging output
CaS defines a -d
command-line option that allows the user to define a file in which the logs can end up instead of standard error.
In order to reproduce this behaviour (and not simply ignore the option), we could add a cahute_set_log_output
function that takes a FILE *
stream for output.
This poses another problem, which is: who has the responsibility to close the FILE *
object at the end of the program's execution? If it is Cahute, since we don't have global initialization or termination (i.e. no cahute_init()
or cahute_exit()
), should we add this, use atexit()
(less compatibility), or introduce global initialization and termination?