Rev 976 | Go to most recent revision | Show entire file | Regard 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 |
|
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 | { |