summaryrefslogtreecommitdiff
path: root/src/log.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-01-18 23:31:33 +0000
committerChristian Pointner <equinox@anytun.org>2009-01-18 23:31:33 +0000
commita39dd07546ab48648021f03e87b2831ffaf50df8 (patch)
tree788b8db0b2dd4162318084739b863412b7a73612 /src/log.cpp
parentdoing replay protection before learning remote host (diff)
some cleanup
Diffstat (limited to 'src/log.cpp')
-rw-r--r--src/log.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/log.cpp b/src/log.cpp
index 8b24025..6ffc560 100644
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -40,7 +40,7 @@ Log* Log::inst = NULL;
Mutex Log::instMutex;
Log& cLog = Log::instance();
-#ifndef NOCRYPT
+#ifndef NO_CRYPT
#ifndef USE_SSL_CRYPTO
std::ostream& operator<<(std::ostream& stream, LogGpgError const& value)
{
@@ -71,10 +71,10 @@ LogStringBuilder::LogStringBuilder(Log& l, int p) : log(l), prio(p)
LogStringBuilder::~LogStringBuilder()
{
Lock lock(log.mutex);
-#ifndef NOSYSLOG
+#ifndef NO_SYSLOG
syslog(prio | log.getFacility(), "%s", stream.str().c_str());
#endif
-#ifdef LOGSTDOUT
+#ifdef LOG_STDOUT
std::cout << "LOG-" << Log::prioToString(prio) << ": " << stream.str() << std::endl;
#endif
}
@@ -98,12 +98,12 @@ Log::Log()
Log::~Log()
{
-#ifndef NOSYSLOG
+#ifndef NO_SYSLOG
closelog();
#endif
}
-#ifdef NOSYSLOG
+#ifdef NO_SYSLOG
std::string Log::prioToString(int prio)
{
switch(prio) {
@@ -122,7 +122,7 @@ std::string Log::prioToString(int prio)
void Log::open()
{
-#ifndef NOSYSLOG
+#ifndef NO_SYSLOG
openlog(logName.c_str(), LOG_PID, facility);
#endif
}