Subversion Repositories HomeAutomation

Rev

Rev 976 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 976 Rev 981
Line 64... Line 64...
64
    {
64
    {
65
        struct tm tmStruct;
65
        struct tm tmStruct;
66
        time_t t = time(NULL);
66
        time_t t = time(NULL);
67
        gmtime_r(&t, &tmStruct);
67
        gmtime_r(&t, &tmStruct);
68
 
68
 
69
        cout    << "["
-
 
70
                << lpad(itos(tmStruct.tm_hour), 2, '0')
69
        cout << "[" << niceTime() << "] " << str;
71
                << ":"
-
 
72
                << lpad(itos(tmStruct.tm_min), 2, '0')
-
 
73
                << ":"
-
 
74
                << lpad(itos(tmStruct.tm_sec), 2, '0')
-
 
75
                << "] "
-
 
76
                << str;
-
 
77
    }
70
    }
78
}
71
}
79
 
72
 
80
SyslogStream& SyslogStream::operator <<(const string& str)
73
SyslogStream& SyslogStream::operator <<(const string& str)
81
{
74
{