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

Annotation of /innwebd/logfile.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations)
Thu Sep 16 15:41:45 2004 UTC (21 years, 6 months ago) by sysadm
Branch: MAIN
Changes since 1.2: +1 -1 lines
Content type: text/x-c++src
log CurrentThreadId

1 sysadm 1.1 /*******************************************************/
2     /* */
3 sysadm 1.2 /* LeafOK Innbbsd */
4 sysadm 1.1 /* Copyright (C) LeafOK.com, 2003-2004 */
5     /* */
6     /* Programmed by Leaf */
7 sysadm 1.2 /* E-mail:leaflet@leafok.com QQ:6049044 */
8 sysadm 1.1 /* */
9     /* http://bbs.leafok.com */
10     /* http://bbs.leafok.net */
11     /* http://bbs.fenglin.info */
12     /* */
13     /*******************************************************/
14    
15     #include "StdAfx.h"
16     #include ".\logfile.h"
17    
18     logfile::logfile(void)
19     {
20     }
21    
22     logfile::~logfile(void)
23     {
24     }
25    
26     logfile& logfile::log_head(logfile& logfile)
27     {
28     struct tm *newtime;
29     __int64 ltime;
30     char s_time[256];
31    
32     _time64( &ltime );
33     newtime = _localtime64( &ltime );
34     strftime(s_time,255,"%d/%b/%Y %H:%M:%S",newtime);
35    
36 sysadm 1.3 logfile << "[" << s_time << "] [" << GetCurrentThreadId() << "] ";
37 sysadm 1.1
38     return logfile;
39     }
40    
41     logfile& logfile::operator<<(logfile& fun(logfile&))
42     {
43     fun(*this);
44     return (*this);
45     }

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1