From cfb1ef47122283b97ab2e05437c47b6e60f7c54f Mon Sep 17 00:00:00 2001 From: russell Date: Sun, 4 Dec 2005 20:40:46 +0000 Subject: convert most of the option_*'s to a single ast_flags structure. Also, fix some formatting, remove some unnecessary casts, and other little code cleanups. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7331 f38db490-d61c-443f-a65b-d21fe96a405b --- logger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'logger.c') diff --git a/logger.c b/logger.c index bf6799d4a..aae10c604 100644 --- a/logger.c +++ b/logger.c @@ -753,7 +753,7 @@ void ast_log(int level, const char *file, int line, const char *function, const if (level != __LOG_VERBOSE) { sprintf(linestr, "%d", line); - snprintf(buf, sizeof(buf), option_timestamp ? "[%s] %s[%ld]: %s:%s %s: " : "%s %s[%ld]: %s:%s %s: ", + snprintf(buf, sizeof(buf), ast_opt_timestamp ? "[%s] %s[%ld]: %s:%s %s: " : "%s %s[%ld]: %s:%s %s: ", date, term_color(tmp1, levels[level], colors[level], 0, sizeof(tmp1)), (long)GETTID(), @@ -770,7 +770,7 @@ void ast_log(int level, const char *file, int line, const char *function, const /* File channels */ } else if ((chan->logmask & (1 << level)) && (chan->fileptr)) { int res; - snprintf(buf, sizeof(buf), option_timestamp ? "[%s] %s[%ld]: " : "%s %s[%ld] %s: ", date, + snprintf(buf, sizeof(buf), ast_opt_timestamp ? "[%s] %s[%ld]: " : "%s %s[%ld] %s: ", date, levels[level], (long)GETTID(), file); res = fprintf(chan->fileptr, buf); if (res <= 0 && buf[0] != '\0') { /* Error, no characters printed */ @@ -830,7 +830,7 @@ void ast_verbose(const char *fmt, ...) va_list ap; va_start(ap, fmt); - if (option_timestamp) { + if (ast_opt_timestamp) { time_t t; struct tm tm; char date[40]; -- cgit v1.2.3