mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
LogType checking is not necessary, LogError is always type 1
This commit is contained in:
parent
14aff9b19b
commit
4413e54058
@ -249,7 +249,7 @@ void CLog::LogError(const char *fmt, ...)
|
|||||||
|
|
||||||
va_list arglst;
|
va_list arglst;
|
||||||
va_start(arglst, fmt);
|
va_start(arglst, fmt);
|
||||||
vsnprintf(msg, 3071, fmt, arglst);
|
vsnprintf(msg, sizeof(msg)-1, fmt, arglst);
|
||||||
va_end(arglst);
|
va_end(arglst);
|
||||||
|
|
||||||
FILE *pF = NULL;
|
FILE *pF = NULL;
|
||||||
@ -261,14 +261,7 @@ void CLog::LogError(const char *fmt, ...)
|
|||||||
if (!m_LoggedErrMap)
|
if (!m_LoggedErrMap)
|
||||||
{
|
{
|
||||||
fprintf(pF, "L %s: Start of error session.\n", date);
|
fprintf(pF, "L %s: Start of error session.\n", date);
|
||||||
if (m_LogType == 1)
|
fprintf(pF, "L %s: Info (map \"%s\") (logfile \"error_%02d%02d%02d.log\")\n", date, STRING(gpGlobals->mapname), curTime->tm_mon + 1, curTime->tm_mday, curTime->tm_year - 100);
|
||||||
{
|
|
||||||
fprintf(pF, "L %s: Info (map \"%s\") (logfile \"L%02d%02d.log\")\n", date, STRING(gpGlobals->mapname), curTime->tm_mon + 1, curTime->tm_mday);
|
|
||||||
} else if (m_LogType == 2) {
|
|
||||||
fprintf(pF, "L %s: Info (map \"%s\") (logfile \"%s\")\n", date, STRING(gpGlobals->mapname), m_LogFile.c_str());
|
|
||||||
} else if (m_LogType == 3) {
|
|
||||||
fprintf(pF, "L %s: Info (map \"%s\") (logfile \"hl\")\n", date, STRING(gpGlobals->mapname));
|
|
||||||
}
|
|
||||||
m_LoggedErrMap = true;
|
m_LoggedErrMap = true;
|
||||||
}
|
}
|
||||||
fprintf(pF, "L %s: %s\n", date, msg);
|
fprintf(pF, "L %s: %s\n", date, msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user