diff options
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/utils.c b/src/utils.c index a470a9f..da8f347 100644 --- a/src/utils.c +++ b/src/utils.c @@ -10,8 +10,11 @@ void openLog(char path[]) { if(path==NULL) { fdLog=stderr; } else { - //TODO : à implementer - fprintf(stderr,"openLog : not yet implemented\n"); + fdLog=fopen(path, "a"); + if ( fdLog == NULL ) { + fdLog=stderr; + logs(LOG_ERROR,"openLog : cannot open logfile"); //XXX Détailler ça (str_error...) + } } } |