From 336d59ea03f6593518375c981129a69a361883ce Mon Sep 17 00:00:00 2001 From: "mhammond%skippinet.com.au" Date: Thu, 13 Oct 2005 00:59:07 +0000 Subject: [PATCH] Add PyXPCOM_Log() public function. git-svn-id: svn://10.0.0.236/branches/DOM_AGNOSTIC_BRANCH@182141 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/extensions/python/xpcom/src/ErrorUtils.cpp | 5 +++++ mozilla/extensions/python/xpcom/src/PyXPCOM.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/mozilla/extensions/python/xpcom/src/ErrorUtils.cpp b/mozilla/extensions/python/xpcom/src/ErrorUtils.cpp index 587ef15f085..e5f2512aa9d 100644 --- a/mozilla/extensions/python/xpcom/src/ErrorUtils.cpp +++ b/mozilla/extensions/python/xpcom/src/ErrorUtils.cpp @@ -210,6 +210,11 @@ void PyXPCOM_LogWarning(const char *fmt, ...) VLogF(LOGGER_WARNING, fmt, marker); } +void PyXPCOM_Log(const char *level, const nsCString &msg) +{ + DoLogMessage(level, msg.get()); +} + #ifdef DEBUG void PyXPCOM_LogDebug(const char *fmt, ...) { diff --git a/mozilla/extensions/python/xpcom/src/PyXPCOM.h b/mozilla/extensions/python/xpcom/src/PyXPCOM.h index 04f218a043d..1a8ec1bf6a0 100644 --- a/mozilla/extensions/python/xpcom/src/PyXPCOM.h +++ b/mozilla/extensions/python/xpcom/src/PyXPCOM.h @@ -141,6 +141,9 @@ PYXPCOM_EXPORT void PyXPCOM_LogWarning(const char *fmt, ...); // As it's designed for user error/warning, it exists in non-debug builds. PYXPCOM_EXPORT void PyXPCOM_LogError(const char *fmt, ...); +// The raw one +PYXPCOM_EXPORT void PyXPCOM_Log(const char *level, const nsCString &msg); + #ifdef DEBUG // Mainly designed for developers of the XPCOM package. // Only enabled in debug builds.