summaryrefslogtreecommitdiff
path: root/src/log.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-02-20 19:38:39 +0000
committerChristian Pointner <equinox@anytun.org>2009-02-20 19:38:39 +0000
commitfed4a68434600b9b9d5ea4ae4a183e59f1b7cf17 (patch)
tree295ab83f30fe9e4fe51e6771a5df212e379530cc /src/log.h
parentfixed sync error (diff)
added file logging target
Diffstat (limited to 'src/log.h')
-rw-r--r--src/log.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/log.h b/src/log.h
index 8e9cc56..861ad2c 100644
--- a/src/log.h
+++ b/src/log.h
@@ -34,6 +34,8 @@
#include <string>
#include <sstream>
+#include <fstream>
+
#ifdef LOG_SYSLOG
#include <syslog.h>
#endif
@@ -144,7 +146,7 @@ public:
static const int PRIO_INFO = 7;
static const int PRIO_DEBUG = 8;
#endif
-#ifdef LOG_STDOUT
+#if defined(LOG_STDOUT) || defined(LOG_FILE)
static std::string prioToString(int prio);
#endif
#ifdef LOG_WINEVENTLOG
@@ -184,6 +186,9 @@ private:
std::string logName;
int facility;
+#ifdef LOG_FILE
+ std::ofstream log_file;
+#endif
#ifdef LOG_WINEVENTLOG
HANDLE h_event_source_;
#endif