[icinga-checkins] icinga.org: icinga-core/next: idoutils: fix %lld compiler warning in logging.c
git at icinga.org
git at icinga.org
Wed Feb 22 10:46:50 CET 2012
Module: icinga-core
Branch: next
Commit: 3cc9709385546e6c7a70f8466c874734354a3877
URL: https://git.icinga.org/?p=icinga-core.git;a=commit;h=3cc9709385546e6c7a70f8466c874734354a3877
Author: Thomas Dressler <tdressler at tdressler.net>
Date: Sun Jan 29 16:39:39 2012 +0100
idoutils: fix %lld compiler warning in logging.c
---
module/idoutils/src/logging.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/module/idoutils/src/logging.c b/module/idoutils/src/logging.c
index 84873b4..0ce3bdc 100644
--- a/module/idoutils/src/logging.c
+++ b/module/idoutils/src/logging.c
@@ -72,6 +72,7 @@ int ido2db_log_debug_info(int level, int verbosity, const char *fmt, ...) {
struct tm *tm;
char temp_time[80];
struct timeval current_time;
+ unsigned long tid;
if (!(ido2db_debug_level == IDO2DB_DEBUGL_ALL || (level & ido2db_debug_level)))
return IDO_OK;
@@ -88,11 +89,11 @@ int ido2db_log_debug_info(int level, int verbosity, const char *fmt, ...) {
time(&t);
tm=localtime(&t);
strftime(temp_time, 80, "%c", tm);
-
+ tid=(unsigned long)pthread_self();
if (ido2db_debug_readable_timestamp)
- fprintf(ido2db_debug_file_fp, "%s .%06lu [%03d.%d] [pid=%lu] [tid=%lld] ", temp_time, current_time.tv_usec, level, verbosity, (unsigned long)getpid(), (unsigned long int)pthread_self());
+ fprintf(ido2db_debug_file_fp, "%s .%06lu [%03d.%d] [pid=%lu] [tid=%lu] ", temp_time, current_time.tv_usec, level, verbosity, (unsigned long)getpid(), tid);
else
- fprintf(ido2db_debug_file_fp, "[%lu.%06lu] [%03d.%d] [pid=%lu] [tid=%ld] ", current_time.tv_sec, current_time.tv_usec, level, verbosity, (unsigned long)getpid(), (unsigned long int)pthread_self());
+ fprintf(ido2db_debug_file_fp, "[%lu.%06lu] [%03d.%d] [pid=%lu] [tid=%lu] ", current_time.tv_sec, current_time.tv_usec, level, verbosity, (unsigned long)getpid(), tid);
/* write the data */
va_start(ap, fmt);
More information about the icinga-checkins
mailing list