Log format '%!' prints thread ID
[yaz-moved-to-github.git] / src / log.c
index f42ae3b..0689f67 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -1,13 +1,13 @@
 /*
- * Copyright (C) 1995-2005, Index Data ApS
+ * Copyright (C) 1995-2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: log.c,v 1.34 2006-03-24 13:58:43 adam Exp $
+ * $Id: log.c,v 1.36 2006-06-30 11:09:44 adam Exp $
  */
 
 /**
  * \file log.c
- * \brief Implements logging utility
+ * \brief Logging utility
  */
 
 #if HAVE_CONFIG_H
@@ -339,6 +339,9 @@ static void yaz_strftime(char *dst, size_t sz,
         DWORD tid = GetCurrentThreadId();
 #else
         long tid = 0;
+#if YAZ_POSIX_THREADS
+        tid = pthread_self();
+#endif
 #endif
         memcpy(fmt2, fmt, cp-fmt);
         fmt2[cp-fmt] = '\0';