Add debug option to log SMTP session transcripts.
[dcpomatic.git] / src / lib / log_entry.cc
index 9b399e4b67f38a67d0eecb12f7fbb4a0ae939f60..ea2d22462932fb5d6d1edf89ecd084d0391883c1 100644 (file)
@@ -28,6 +28,7 @@ int const LogEntry::TYPE_ERROR        = 0x4;
 int const LogEntry::TYPE_DEBUG_DECODE = 0x8;
 int const LogEntry::TYPE_DEBUG_ENCODE = 0x10;
 int const LogEntry::TYPE_TIMING       = 0x20;
+int const LogEntry::TYPE_DEBUG_EMAIL  = 0x40;
 
 using std::string;
 
@@ -45,7 +46,8 @@ LogEntry::get () const
                s << _time.tv_sec << ":" << _time.tv_usec;
        } else {
                char buffer[64];
-               struct tm* t = localtime (&_time.tv_sec);
+               time_t const sec = _time.tv_sec;
+               struct tm* t = localtime (&sec);
                strftime (buffer, 64, "%c", t);
                string a (buffer);
                s << a.substr (0, a.length() - 1) << N_(": ");