diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-12 23:31:13 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-12 23:31:13 +0000 |
commit | 49311b0c6df075b556e0941ef82b43757e94555c (patch) | |
tree | 071520f63740c5f5e7767c43d8b490107bfa1576 | |
parent | ed105d7fef72b5bb5f23e72fae40d6b4ffdcb5b8 (diff) |
Avoid pointless vsnprintf() when our loglevel doesnt meet requirements
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5970 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/helperfuncs.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 05f2d79c3..2398e6668 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -32,6 +32,10 @@ static time_t LAST = 0; */ void InspIRCd::Log(int level, const char* text, ...) { + /* Do this check again here so that we save pointless vsnprintf calls */ + if ((level < Config->LogLevel) && !Config->forcedebug) + return; + va_list argsPtr; char textbuffer[65536]; |