From fd2b4a0598a5f7b1301e81c8fdb99cda2a131e46 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Wed, 21 Mar 2007 21:12:14 +0000 Subject: [PATCH] Have log print thread pid (avvdr) --- log.cc | 2 +- log.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/log.cc b/log.cc index 884769f..31ebddf 100644 --- a/log.cc +++ b/log.cc @@ -124,7 +124,7 @@ int Log::log(char *fromModule, int level, char* message, ...) if (level == INFO) strcpy(levelString, "[info] "); if (level == DEBUG) strcpy(levelString, "[debug] "); - spaceLeft -= SNPRINTF(&buffer[150-spaceLeft], spaceLeft, "%s %s - ", levelString, fromModule); + spaceLeft -= SNPRINTF(&buffer[150-spaceLeft], spaceLeft, "%s %d %s - ", levelString, getpid(), fromModule); va_list ap; va_start(ap, message); diff --git a/log.h b/log.h index 0b5c197..66a210d 100644 --- a/log.h +++ b/log.h @@ -32,6 +32,8 @@ #include #include #include +#include +#include #include "defines.h" class Log -- 2.39.5