gcc has a "format" attribute to declare that a function or method accepts a printf-like format string and variable arguments. This allows the compiler to check the type of arguments. For example a warning is emitted if attempting to pass an std::string without .c_str() call.
log4cpp does not use this attribute in places where it could. As a result, the code compile without warnings and problems are found only at runtime.