diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-10-21 19:23:18 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-10-21 19:23:18 +0000 |
commit | f3513a79b3cff00d57ae8716c0eaebc37bd37ed1 (patch) | |
tree | 3368b748cc2ab037bba5109268e39b38a3af2ffe /ndb/src/common/logger | |
parent | 63920158ced1f2b343b14b723c2f5d9a92b06e62 (diff) | |
download | mariadb-git-f3513a79b3cff00d57ae8716c0eaebc37bd37ed1.tar.gz |
more snprintf...
Diffstat (limited to 'ndb/src/common/logger')
-rw-r--r-- | ndb/src/common/logger/FileLogHandler.cpp | 4 | ||||
-rw-r--r-- | ndb/src/common/logger/LogHandler.cpp | 4 | ||||
-rw-r--r-- | ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp | 2 | ||||
-rw-r--r-- | ndb/src/common/logger/loggertest/LoggerUnitTest.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/ndb/src/common/logger/FileLogHandler.cpp b/ndb/src/common/logger/FileLogHandler.cpp index 632db71db15..29172ff93ad 100644 --- a/ndb/src/common/logger/FileLogHandler.cpp +++ b/ndb/src/common/logger/FileLogHandler.cpp @@ -153,11 +153,11 @@ FileLogHandler::createNewFile() if (fileNo >= m_maxNoFiles) { fileNo = 1; - ::snprintf(newName, sizeof(newName), + BaseString::snprintf(newName, sizeof(newName), "%s.%d", m_pLogFile->getName(), fileNo); break; } - ::snprintf(newName, sizeof(newName), + BaseString::snprintf(newName, sizeof(newName), "%s.%d", m_pLogFile->getName(), fileNo++); } while (File_class::exists(newName)); diff --git a/ndb/src/common/logger/LogHandler.cpp b/ndb/src/common/logger/LogHandler.cpp index 83d479c82fd..4fab957fc50 100644 --- a/ndb/src/common/logger/LogHandler.cpp +++ b/ndb/src/common/logger/LogHandler.cpp @@ -45,7 +45,7 @@ LogHandler::getDefaultHeader(char* pStr, const char* pCategory, Logger::LoggerLevel level) const { char time[MAX_DATE_TIME_HEADER_LENGTH]; - ::snprintf(pStr, MAX_HEADER_LENGTH, "%s [%s] %s -- ", + BaseString::snprintf(pStr, MAX_HEADER_LENGTH, "%s [%s] %s -- ", getTimeAsString((char*)time), pCategory, Logger::LoggerLevelNames[level]); @@ -84,7 +84,7 @@ LogHandler::getTimeAsString(char* pStr) const tm_now = ::localtime(&now); //uses the "current" timezone #endif - ::snprintf(pStr, MAX_DATE_TIME_HEADER_LENGTH, + BaseString::snprintf(pStr, MAX_DATE_TIME_HEADER_LENGTH, m_pDateTimeFormat, tm_now->tm_year + 1900, tm_now->tm_mon + 1, //month is [0,11]. +1 -> [1,12] diff --git a/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp b/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp index 2bb02ad688f..7de9ee46479 100644 --- a/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp +++ b/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp @@ -128,7 +128,7 @@ LogHandlerListUnitTest::testTraverseNext(const char* msg) { char* str = new char[3]; pHandlers[i] = new ConsoleLogHandler(); - ::snprintf(str, 3, "%d", i); + BaseString::snprintf(str, 3, "%d", i); pHandlers[i]->setDateTimeFormat(str); list.add(pHandlers[i]); } diff --git a/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp b/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp index 017dcb79c1f..990d2e0eada 100644 --- a/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp +++ b/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp @@ -86,7 +86,7 @@ NDB_COMMAND(loggertest, "loggertest", "loggertest -console | -file", { ndbout << "-- " << " Test " << i + 1 << " [" << testCases[i].name << "] --" << endl; - ::snprintf(str, 256, "%s %s %s %d", "Logging ", + BaseString::snprintf(str, 256, "%s %s %s %d", "Logging ", testCases[i].name, " message ", i); if (testCases[i].test(str)) { |