/[LeafOK_CVS]/innwebd/logfile.cpp
ViewVC logotype

Annotation of /innwebd/logfile.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations)
Fri Apr 11 17:14:49 2008 UTC (17 years, 11 months ago) by sysadm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +2 -6 lines
Content type: text/x-c++src
Update copyright
Add extra log for exception

1 sysadm 1.1 /*******************************************************/
2     /* */
3 sysadm 1.2 /* LeafOK Innbbsd */
4 sysadm 1.1 /* */
5 sysadm 1.5 /* Copyright (C) LeafOK.com, 2003-2008 */
6 sysadm 1.1 /* */
7 sysadm 1.5 /* http://www.leafok.com */
8 sysadm 1.1 /* */
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( &ltime );
29     newtime = _localtime64( &ltime );
30     strftime(s_time,255,"%d/%b/%Y %H:%M:%S",newtime);
31    
32 sysadm 1.3 logfile << "[" << s_time << "] [" << GetCurrentThreadId() << "] ";
33 sysadm 1.1
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