Index: ext/libicpf/src/libicpf/log.cpp =================================================================== diff -u -N -r3150d0c0a9a5fe75a5954e17a5a445a14e0bea1f -re06b4c55cea63c808a60d6708341dca04ee39212 --- ext/libicpf/src/libicpf/log.cpp (.../log.cpp) (revision 3150d0c0a9a5fe75a5954e17a5a445a14e0bea1f) +++ ext/libicpf/src/libicpf/log.cpp (.../log.cpp) (revision e06b4c55cea63c808a60d6708341dca04ee39212) @@ -364,11 +364,22 @@ /** Logs a formatted debug message to a log file. * \param[in] pszStr - format string for the given parameters */ -void log_file::logd(const tchar_t* pszStr, ...) +void log_file::logd(const tchar_t* pszStr) { if (m_iLogLevel > level_debug) return; + logs(level_debug, false, pszStr); +} + +/** Logs a formatted debug message to a log file. +* \param[in] pszStr - format string for the given parameters +*/ +void log_file::logdv(const tchar_t* pszStr, ...) +{ + if (m_iLogLevel > level_debug) + return; + va_list va; va_start(va, pszStr); logv(level_debug, false, pszStr, va); @@ -390,10 +401,14 @@ } #else -void log_file::logd(const tchar_t* /*pszStr*/, ...) +void log_file::logd(const tchar_t* /*pszStr*/) { } +void log_file::logdv(const tchar_t* /*pszStr*/, ...) +{ +} + void log_file::logds(const tchar_t* /*pszStr*/, ...) { } @@ -403,11 +418,22 @@ /** Logs a formatted informational message to a log file. * \param[in] pszStr - format string for the given parameters */ -void log_file::logi(const tchar_t* pszStr, ...) +void log_file::logi(const tchar_t* pszStr) { if (m_iLogLevel > level_info) return; + logs(level_info, false, pszStr); +} + +/** Logs a formatted informational message to a log file. +* \param[in] pszStr - format string for the given parameters +*/ +void log_file::logiv(const tchar_t* pszStr, ...) +{ + if (m_iLogLevel > level_info) + return; + va_list va; va_start(va, pszStr); logv(level_info, false, pszStr, va); @@ -428,10 +454,14 @@ va_end(va); } #else -void log_file::logi(const tchar_t* /*pszStr*/, ...) +void log_file::logi(const tchar_t* /*pszStr*/) { } +void log_file::logiv(const tchar_t* /*pszStr*/, ...) +{ +} + void log_file::logis(const tchar_t* /*pszStr*/, ...) { } @@ -442,11 +472,22 @@ /** Logs a formatted warning message to a log file. * \param[in] pszStr - format string for the given parameters */ -void log_file::logw(const tchar_t* pszStr, ...) +void log_file::logw(const tchar_t* pszStr) { if (m_iLogLevel > level_warning) return; + logs(level_warning, false, pszStr); +} + +/** Logs a formatted warning message to a log file. +* \param[in] pszStr - format string for the given parameters +*/ +void log_file::logwv(const tchar_t* pszStr, ...) +{ + if (m_iLogLevel > level_warning) + return; + va_list va; va_start(va, pszStr); logv(level_warning, false, pszStr, va); @@ -467,10 +508,14 @@ } #else -void log_file::logw(const tchar_t* /*pszStr*/, ...) +void log_file::logw(const tchar_t* /*pszStr*/) { } +void log_file::logwv(const tchar_t* /*pszStr*/, ...) +{ +} + void log_file::logws(const tchar_t* /*pszStr*/, ...) { } @@ -480,8 +525,16 @@ /** Logs a formatted error message to a log file. * \param[in] pszStr - format string for the given parameters */ -void log_file::loge(const tchar_t* pszStr, ...) +void log_file::loge(const tchar_t* pszStr) { + logs(level_error, false, pszStr); +} + +/** Logs a formatted error message to a log file. +* \param[in] pszStr - format string for the given parameters +*/ +void log_file::logev(const tchar_t* pszStr, ...) +{ va_list va; va_start(va, pszStr); logv(level_error, false, pszStr, va);