diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-15 20:49:33 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-15 20:49:33 +0000 |
commit | 13a7d48993208605619cbc67af4a526c85c66b38 (patch) | |
tree | 97912d0564298338da7cadd4c5f40f7bc4b64312 /cdr | |
parent | 4834419aa805a1c38b26f4c60adca0dfcc400b78 (diff) |
Extra debugging in CDRCSV (bug #3063)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4462 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr')
-rwxr-xr-x | cdr/cdr_csv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cdr/cdr_csv.c b/cdr/cdr_csv.c index 95598bd52..bd18a7775 100755 --- a/cdr/cdr_csv.c +++ b/cdr/cdr_csv.c @@ -33,6 +33,7 @@ #include <stdio.h> #include <string.h> +#include <errno.h> #include <stdlib.h> #include <unistd.h> @@ -218,7 +219,7 @@ static int csv_log(struct ast_cdr *cdr) we open write and close the log file each time */ mf = fopen(csvmaster, "a"); if (!mf) { - ast_log(LOG_ERROR, "Unable to re-open master file %s\n", csvmaster); + ast_log(LOG_ERROR, "Unable to re-open master file %s : %s\n", csvmaster, strerror(errno)); } if (mf) { fputs(buf, mf); @@ -228,7 +229,7 @@ static int csv_log(struct ast_cdr *cdr) } if (!ast_strlen_zero(cdr->accountcode)) { if (writefile(buf, cdr->accountcode)) - ast_log(LOG_WARNING, "Unable to write CSV record to account file '%s'\n", cdr->accountcode); + ast_log(LOG_WARNING, "Unable to write CSV record to account file '%s' : %s\n", cdr->accountcode, strerror(errno)); } } return 0; |