core/Logger.cpp
changeset 738 af89f69ac3a0
parent 673 fc1d50579d06
child 1231 17badaf66ce4
     1.1 --- a/core/Logger.cpp	Fri May 04 20:52:35 2007 +0000
     1.2 +++ b/core/Logger.cpp	Fri May 04 21:21:55 2007 +0000
     1.3 @@ -107,7 +107,7 @@
     1.4  
     1.5  	while (true)
     1.6  	{
     1.7 -		g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/logs_%02d%02d%03d.log", curtime->tm_mon + 1, curtime->tm_mday, i);
     1.8 +		g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/L%02d%02d%03d.log", curtime->tm_mon + 1, curtime->tm_mday, i);
     1.9  		FILE *fp = fopen(_filename, "r");
    1.10  		if (!fp)
    1.11  		{
    1.12 @@ -127,7 +127,7 @@
    1.13  	} else {
    1.14  		char date[32];
    1.15  		strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime);
    1.16 -		fprintf(fp, "L %s: SourceMod log file started (file \"logs_%02d%02d%03d.log\") (Version \"%s\")\n", date, curtime->tm_mon + 1, curtime->tm_mday, i, SVN_FULL_VERSION);
    1.17 +		fprintf(fp, "L %s: SourceMod log file started (file \"L%02d%02d%03d.log\") (Version \"%s\")\n", date, curtime->tm_mon + 1, curtime->tm_mday, i, SVN_FULL_VERSION);
    1.18  		fclose(fp);
    1.19  	}
    1.20  }
    1.21 @@ -177,7 +177,7 @@
    1.22  	m_CurDay = curtime->tm_mday;
    1.23  
    1.24  	char _filename[256];
    1.25 -	g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/errors_%02d%02d%02d.log", curtime->tm_mon + 1, curtime->tm_mday, curtime->tm_year - 100);
    1.26 +	g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/errors_%04d%02d%02d.log", curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday);
    1.27  	m_ErrFileName.assign(_filename);
    1.28  
    1.29  	switch (m_Mode)
    1.30 @@ -192,7 +192,7 @@
    1.31  		}
    1.32  	case LoggingMode_Daily:
    1.33  		{
    1.34 -			g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/logs_%02d%02d.log", curtime->tm_mon + 1, curtime->tm_mday);
    1.35 +			g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/L%04d%02d%02d.log", curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday);
    1.36  			m_NrmFileName.assign(_filename);
    1.37  			m_DailyPrintHdr = true;
    1.38  			break;
    1.39 @@ -261,7 +261,7 @@
    1.40  		if (m_CurDay != curtime->tm_mday)
    1.41  		{
    1.42  			char _filename[256];
    1.43 -			g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/logs_%02d%02d.log", curtime->tm_mon + 1, curtime->tm_mday);
    1.44 +			g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/L%04d%02d%02d.log", curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday);
    1.45  			m_NrmFileName.assign(_filename);
    1.46  			m_CurDay = curtime->tm_mday;
    1.47  			m_DailyPrintHdr = true;
    1.48 @@ -274,7 +274,7 @@
    1.49  		if (m_DailyPrintHdr)
    1.50  		{
    1.51  			m_DailyPrintHdr = false;
    1.52 -			fprintf(fp, "L %s: SourceMod log file session started (file \"logs_%02d%02d.log\") (Version \"%s\")\n", date, curtime->tm_mon + 1, curtime->tm_mday, SVN_FULL_VERSION);
    1.53 +			fprintf(fp, "L %s: SourceMod log file session started (file \"L%04d%02d%02d.log\") (Version \"%s\")\n", date, curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday, SVN_FULL_VERSION);
    1.54  	 	}
    1.55  		fprintf(fp, "L %s: %s\n", date, msg);
    1.56  		fclose(fp);
    1.57 @@ -306,7 +306,7 @@
    1.58  	if (curtime->tm_mday != m_CurDay)
    1.59  	{
    1.60  		char _filename[256];
    1.61 -		g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/errors_%02d%02d%02d.log", curtime->tm_mon + 1, curtime->tm_mday, curtime->tm_year - 100);
    1.62 +		g_SourceMod.BuildPath(Path_SM, _filename, sizeof(_filename), "logs/errors_%04d%02d%02d.log", curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday);
    1.63  		m_ErrFileName.assign(_filename);
    1.64  		m_CurDay = curtime->tm_mday;
    1.65  		m_ErrMapStart = false;
    1.66 @@ -324,7 +324,7 @@
    1.67  		if (!m_ErrMapStart)
    1.68  		{
    1.69  			fprintf(fp, "L %s: SourceMod error session started\n", date);
    1.70 -			fprintf(fp, "L %s: Info (map \"%s\") (log file \"errors_%02d%02d%02d.log\")\n", date, m_CurMapName.c_str(), curtime->tm_mon + 1, curtime->tm_mday, curtime->tm_year - 100);
    1.71 +			fprintf(fp, "L %s: Info (map \"%s\") (file \"errors_%04d%02d%02d.log\")\n", date, m_CurMapName.c_str(), curtime->tm_year + 1900, curtime->tm_mon + 1, curtime->tm_mday);
    1.72  			m_ErrMapStart = true;
    1.73  		}
    1.74  		fprintf(fp, "L %s: %s\n", date, msg);