12 #ifdef ENABLE_LOGGER_CHECKS
17 using namespace boost;
24 const unsigned placeholder)
26 const string mark(
"%" + lexical_cast<string>(placeholder));
27 size_t pos(message->find(mark));
28 if (pos != string::npos) {
30 message->replace(pos, mark.size(), arg);
31 pos = message->find(mark, pos + arg.size());
32 }
while (pos != string::npos);
34 #ifdef ENABLE_LOGGER_CHECKS
38 "Missing logger placeholder in message: " << *message);
43 message->append(
" @@Missing placeholder " + mark +
" for '" + arg +
"'@@");
50 const string mark(
"%" + lexical_cast<string>(placeholder));
51 const size_t pos(message->find(mark));
52 if (pos != string::npos) {
57 #ifdef ENABLE_LOGGER_CHECKS
60 cerr <<
"Message " << *message << endl;
61 assert(
"Excess logger placeholders still exist in message" == NULL);
63 message->append(
" @@Excess logger placeholders still exist@@");