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.