summaryrefslogtreecommitdiff
path: root/lib/common
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-08-03 06:56:16 +0000
committerChris Wilson <chris+github@qwirx.com>2008-08-03 06:56:16 +0000
commitcd77024172fd0e5d0d0d3b357609ee64db899698 (patch)
tree218572433aaef18b9f26cf31390ea2a9af1bd304 /lib/common
parent430bbb36f6e1040333a22b79938938754dd49aac (diff)
Remove Windows limitation on Logging that showing PID was not possible.
Diffstat (limited to 'lib/common')
-rw-r--r--lib/common/Logging.cpp8
-rw-r--r--lib/common/Logging.h4
2 files changed, 0 insertions, 12 deletions
diff --git a/lib/common/Logging.cpp b/lib/common/Logging.cpp
index 23f760bd..3cd8c219 100644
--- a/lib/common/Logging.cpp
+++ b/lib/common/Logging.cpp
@@ -227,9 +227,7 @@ Logger::~Logger()
bool Console::sShowTime = false;
bool Console::sShowTimeMicros = false;
bool Console::sShowTag = false;
-#ifndef WIN32
bool Console::sShowPID = false;
-#endif
std::string Console::sTag;
void Console::SetTag(const std::string& rTag)
@@ -248,12 +246,10 @@ void Console::SetShowTimeMicros(bool enabled)
sShowTimeMicros = enabled;
}
-#ifndef WIN32
void Console::SetShowPID(bool enabled)
{
sShowPID = enabled;
}
-#endif
bool Console::Log(Log::Level level, const std::string& rFile,
int line, std::string& rMessage)
@@ -280,23 +276,19 @@ bool Console::Log(Log::Level level, const std::string& rFile,
if (sShowTag)
{
- #ifndef WIN32
if (sShowPID)
{
buf << "[" << sTag << " " << getpid() << "] ";
}
else
- #endif
{
buf << "[" << sTag << "] ";
}
}
- #ifndef WIN32
else if (sShowPID)
{
buf << "[" << getpid() << "] ";
}
- #endif
if (level <= Log::FATAL)
{
diff --git a/lib/common/Logging.h b/lib/common/Logging.h
index 12860444..6224a73f 100644
--- a/lib/common/Logging.h
+++ b/lib/common/Logging.h
@@ -147,9 +147,7 @@ class Console : public Logger
static bool sShowTimeMicros;
static bool sShowTag;
static std::string sTag;
- #ifndef WIN32
static bool sShowPID;
- #endif
public:
virtual bool Log(Log::Level level, const std::string& rFile,
@@ -160,9 +158,7 @@ class Console : public Logger
static void SetTag(const std::string& rTag);
static void SetShowTime(bool enabled);
static void SetShowTimeMicros(bool enabled);
- #ifndef WIN32
static void SetShowPID(bool enabled);
- #endif
};
// --------------------------------------------------------------------------