Merged revisions 74515 via svnmerge from
[asterisk/asterisk.git] / cdr / cdr_csv.c
index 3506203..f40f555 100644 (file)
@@ -45,6 +45,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/channel.h"
 #include "asterisk/cdr.h"
 #include "asterisk/module.h"
+#include "asterisk/options.h"
 #include "asterisk/logger.h"
 #include "asterisk/utils.h"
 
@@ -121,7 +122,7 @@ static int load_config(void)
        if (tmp) {
                usegmtime = ast_true(tmp);
                if (usegmtime) {
-                       ast_log(LOG_DEBUG, "logging time in GMT\n");
+                       ast_debug(1, "logging time in GMT\n");
                }
        }
 
@@ -129,7 +130,7 @@ static int load_config(void)
        if (tmp) {
                loguniqueid = ast_true(tmp);
                if (loguniqueid) {
-                       ast_log(LOG_DEBUG, "logging CDR field UNIQUEID\n");
+                       ast_debug(1, "logging CDR field UNIQUEID\n");
                }
        }
 
@@ -137,7 +138,7 @@ static int load_config(void)
        if (tmp) {
                loguserfield = ast_true(tmp);
                if (loguserfield) {
-                       ast_log(LOG_DEBUG, "logging CDR user-defined field\n");
+                       ast_debug(1, "logging CDR user-defined field\n");
                }
        }
 
@@ -199,7 +200,7 @@ static int append_date(char *buf, struct timeval tv, size_t bufsize)
        if (usegmtime) {
                gmtime_r(&t,&tm);
        } else {
-               localtime_r(&t,&tm);
+               ast_localtime(&t, &tm, NULL);
        }
        strftime(tmp, sizeof(tmp), DATE_FORMAT, &tm);
        return append_string(buf, tmp, bufsize);