Index: ext/libicpf/src/libicpf/dumpctx.cpp =================================================================== diff -u -N -r3150d0c0a9a5fe75a5954e17a5a445a14e0bea1f -re06b4c55cea63c808a60d6708341dca04ee39212 --- ext/libicpf/src/libicpf/dumpctx.cpp (.../dumpctx.cpp) (revision 3150d0c0a9a5fe75a5954e17a5a445a14e0bea1f) +++ ext/libicpf/src/libicpf/dumpctx.cpp (.../dumpctx.cpp) (revision e06b4c55cea63c808a60d6708341dca04ee39212) @@ -103,7 +103,7 @@ } case type_log: { - ((log_file*)m_pParam)->logd(TSTRFMT, m_pBuffer->c_str()); + ((log_file*)m_pParam)->logdv(TSTRFMT, m_pBuffer->c_str()); break; } default: Index: ext/libicpf/src/libicpf/exception.cpp =================================================================== diff -u -N -r3150d0c0a9a5fe75a5954e17a5a445a14e0bea1f -re06b4c55cea63c808a60d6708341dca04ee39212 --- ext/libicpf/src/libicpf/exception.cpp (.../exception.cpp) (revision 3150d0c0a9a5fe75a5954e17a5a445a14e0bea1f) +++ ext/libicpf/src/libicpf/exception.cpp (.../exception.cpp) (revision e06b4c55cea63c808a60d6708341dca04ee39212) @@ -159,7 +159,7 @@ */ void exception::log(const tchar_t* pszDesc, log_file* plog) { - plog->loge(TSTRFMT _t("\n\tdesc: ") TSTRFMT _t("\n\tfile: ") TSTRFMT _t("\n\tfunc: ") TSTRFMT _t("\n\tline: ") ULFMT _t("\n\tapp code: ") ULFMT _t("\n\tsys code: ") ULFMT _t("\n\treserved: ") ULFMT _t("\n"), + plog->logev(TSTRFMT _t("\n\tdesc: ") TSTRFMT _t("\n\tfile: ") TSTRFMT _t("\n\tfunc: ") TSTRFMT _t("\n\tline: ") ULFMT _t("\n\tapp code: ") ULFMT _t("\n\tsys code: ") ULFMT _t("\n\treserved: ") ULFMT _t("\n"), pszDesc, m_pszDesc, m_pszFilename, m_pszFunction, m_uiLine, m_uiAppCode, m_uiSystemCode, m_uiReserved); } @@ -171,7 +171,7 @@ */ void exception::log(const tchar_t* pszDesc, const tchar_t* pszDesc2, log_file* plog) { - plog->loge(TSTRFMT _t(" ") TSTRFMT _t("\n\tdesc: ") TSTRFMT _t("\n\tfile: ") TSTRFMT _t("\n\tfunc: ") TSTRFMT _t("\n\tline: ") ULFMT _t("\n\tapp code: ") ULFMT _t("\n\tsys code: ") ULFMT _t("\n\treserved: ") ULFMT _t("\n"), + plog->logev(TSTRFMT _t(" ") TSTRFMT _t("\n\tdesc: ") TSTRFMT _t("\n\tfile: ") TSTRFMT _t("\n\tfunc: ") TSTRFMT _t("\n\tline: ") ULFMT _t("\n\tapp code: ") ULFMT _t("\n\tsys code: ") ULFMT _t("\n\treserved: ") ULFMT _t("\n"), pszDesc, pszDesc2, m_pszDesc, m_pszFilename, m_pszFunction, m_uiLine, m_uiAppCode, m_uiSystemCode, m_uiReserved); } 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); Index: ext/libicpf/src/libicpf/log.h =================================================================== diff -u -N -r3150d0c0a9a5fe75a5954e17a5a445a14e0bea1f -re06b4c55cea63c808a60d6708341dca04ee39212 --- ext/libicpf/src/libicpf/log.h (.../log.h) (revision 3150d0c0a9a5fe75a5954e17a5a445a14e0bea1f) +++ ext/libicpf/src/libicpf/log.h (.../log.h) (revision e06b4c55cea63c808a60d6708341dca04ee39212) @@ -66,17 +66,21 @@ void log(int_t iType, bool bStd, const tchar_t* pszStr, ...); ///< Logs a string with formatting void logv(int_t iType, bool bStd, const tchar_t* pszStr, va_list va); ///< Logs a string using va_list - void logd(const tchar_t* pszStr, ...); ///< Logs a debug message with formatting + void logd(const tchar_t* pszStr); ///< Logs a debug message with formatting + void logdv(const tchar_t* pszStr, ...); ///< Logs a debug message with formatting void logds(const tchar_t* pszStr, ...); ///< Logs a debug message with formatting (also prints to stdout) - void logi(const tchar_t* pszStr, ...); ///< Logs an informational message with formatting + void logi(const tchar_t* pszStr); ///< Logs an informational message with formatting + void logiv(const tchar_t* pszStr, ...); ///< Logs an informational message with formatting void logis(const tchar_t* pszStr, ...); ///< Logs an informational message with formatting(also prints to stdout) - void logw(const tchar_t* pszStr, ...); ///< Logs a warning message with formatting - void logws(const tchar_t* pszStr, ...); ///< Logs a warning message with formatting(also prints to stdout) + void logw(const tchar_t* pszStr); ///< Logs a warning message with formatting + void logwv(const tchar_t* pszStr, ...); ///< Logs a warning message with formatting + void logws(const tchar_t* pszStr, ...); ///< Logs a warning message with formatting(also prints to stdout) - void loge(const tchar_t* pszStr, ...); ///< Logs an error message with formatting - void loges(const tchar_t* pszStr, ...); ///< Logs an error message with formatting(also prints to stderr) + void loge(const tchar_t* pszStr); ///< Logs an error message with formatting + void logev(const tchar_t* pszStr, ...); ///< Logs an error message with formatting + void loges(const tchar_t* pszStr, ...); ///< Logs an error message with formatting(also prints to stderr) void logerr(const tchar_t* pszStr, int_t iSysErr, ...); ///< Logs an error message with system error number and error description void logerrs(const tchar_t* pszStr, int_t iSysErr, ...); ///< Logs an error message with system error number and error description (also prints to stderr)