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

Annotation of /innwebd/logfile.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Fri Jul 2 11:36:56 2004 UTC (21 years, 8 months ago) by sysadm
Branch: MAIN
Content type: text/x-c++src
nntp_log.cpp

1 sysadm 1.1 /*******************************************************/
2     /* */
3     /* LeafOK Innd */
4     /* Copyright (C) LeafOK.com, 2003-2004 */
5     /* */
6     /* Programmed by Leaf */
7     /* E-mail:leaf@leafok.com QQ:6049044 */
8     /* */
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     logfile << "[" << s_time << "] ";
37    
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