]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - dansguardian_log.c
Explain the reason when a file cannot be opened
[thirdparty/sarg.git] / dansguardian_log.c
index 69e37b651895ee01b3a8ccc15fdc06c6fa471dff..3701a79d17f562571417fb04b902fe4a4737b75b 100644 (file)
@@ -58,12 +58,12 @@ void dansguardian_log(void)
        }
 
        if((fp_guard=fopen(DansGuardianConf,"r"))==NULL) {
-               debuga(_("(dansguardian) Cannot open log file: %s\n"),DansGuardianConf);
+               debuga(_("(dansguardian) Cannot open log file %s: %s\n"),DansGuardianConf,strerror(errno));
                exit(EXIT_FAILURE);
        }
 
        if((fp_ou=MY_FOPEN(guard_in,"a"))==NULL) {
-               debuga(_("(dansguardian) Cannot open log file: %s\n"),guard_in);
+               debuga(_("(dansguardian) Cannot open log file %s: %s\n"),guard_in,strerror(errno));
                exit(EXIT_FAILURE);
        }
 
@@ -87,7 +87,7 @@ void dansguardian_log(void)
                debuga(_("Reading DansGuardian log file: %s\n"),loglocation);
 
        if((fp_in=MY_FOPEN(loglocation,"r"))==NULL) {
-               debuga(_("(dansguardian) Cannot open log file: %s\n"),loglocation);
+               debuga(_("(dansguardian) Cannot open log file %s: %s\n"),loglocation,strerror(errno));
                exit(EXIT_FAILURE);
        }