Permalink
Browse files

Have SyslogLogger defined in Windows, but with empty methods

Seems that moc gets confused the way I had it before.  Nothing will be *using*
the class, but moc doens't know that.
  • Loading branch information...
1 parent 8a0724f commit 89106e61ffb2658a1e82a306539aa5a6f2a667d2 @Beirdo Beirdo committed Jun 13, 2012
Showing with 32 additions and 2 deletions.
  1. +32 −0 mythtv/libs/libmythbase/loggingserver.cpp
  2. +0 −2 mythtv/libs/libmythbase/loggingserver.h
@@ -304,6 +304,28 @@ void SyslogLogger::setupZMQSocket(void)
m_zmqSock->subscribeTo(QByteArray(""));
m_zmqSock->connectTo("inproc://loggers");
}
+#else
+
+// Windows doesn't have syslog support
+
+SyslogLogger::SyslogLogger() : LoggerBase(NULL), m_opened(false)
+{
+}
+
+SyslogLogger::~SyslogLogger()
+{
+}
+
+bool SyslogLogger::logmsg(LoggingItem *item)
+{
+ (void)item;
+ return false;
+}
+
+void SyslogLogger::setupZMQSocket(void)
+{
+}
+
#endif
const int DatabaseLogger::kMinDisabledTime = 1000;
@@ -876,6 +898,16 @@ void SyslogLogger::receivedMessage(const QList<QByteArray> &msg)
logmsg(item);
item->deleteItem();
}
+
+#else
+
+// Windows doesn't have syslog support
+
+void SyslogLogger::receivedMessage(const QList<QByteArray> &msg)
+{
+ (void)msg;
+}
+
#endif
void DatabaseLogger::receivedMessage(const QList<QByteArray> &msg)
@@ -65,7 +65,6 @@ class FileLogger : public LoggerBase {
void receivedMessage(const QList<QByteArray>&);
};
-#ifndef _WIN32
/// \brief Syslog-based logger (not available in Windows)
class SyslogLogger : public LoggerBase {
Q_OBJECT
@@ -84,7 +83,6 @@ class SyslogLogger : public LoggerBase {
protected slots:
void receivedMessage(const QList<QByteArray>&);
};
-#endif
class DBLoggerThread;

0 comments on commit 89106e6

Please sign in to comment.