Parent Directory
|
Revision Log
Update copyright Add extra log for exception
| 1 | /*******************************************************/ |
| 2 | /* */ |
| 3 | /* LeafOK Innbbsd */ |
| 4 | /* */ |
| 5 | /* Copyright (C) LeafOK.com, 2003-2008 */ |
| 6 | /* */ |
| 7 | /* http://www.leafok.com */ |
| 8 | /* */ |
| 9 | /*******************************************************/ |
| 10 | |
| 11 | #include "StdAfx.h" |
| 12 | #include ".\logfile.h" |
| 13 | |
| 14 | logfile::logfile(void) |
| 15 | { |
| 16 | } |
| 17 | |
| 18 | logfile::~logfile(void) |
| 19 | { |
| 20 | } |
| 21 | |
| 22 | logfile& logfile::log_head(logfile& logfile) |
| 23 | { |
| 24 | struct tm *newtime; |
| 25 | __int64 ltime; |
| 26 | char s_time[256]; |
| 27 | |
| 28 | _time64( <ime ); |
| 29 | newtime = _localtime64( <ime ); |
| 30 | strftime(s_time,255,"%d/%b/%Y %H:%M:%S",newtime); |
| 31 | |
| 32 | logfile << "[" << s_time << "] [" << GetCurrentThreadId() << "] "; |
| 33 | |
| 34 | return logfile; |
| 35 | } |
| 36 | |
| 37 | logfile& logfile::operator<<(logfile& fun(logfile&)) |
| 38 | { |
| 39 | fun(*this); |
| 40 | return (*this); |
| 41 | } |
| webmaster@leafok.com | ViewVC Help |
| Powered by ViewVC 1.3.0-beta1 |