shell-loginit
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 125 ed7d306bd129b107164a8121618c28e7a64d68d0
permissions -rw-r--r--
State as of now

* * *

diff --git a/js/src/xpconnect/shell/xpcshell.cpp b/js/src/xpconnect/shell/xpcshell.cpp
--- a/js/src/xpconnect/shell/xpcshell.cpp
+++ b/js/src/xpconnect/shell/xpcshell.cpp
@@ -1298,12 +1298,29 @@ ContextCallback(JSContext *cx, uintN con
     return JS_TRUE;
 }
 
+class AutoLogger
+{
+public:
+    AutoLogger()
+    {
+        NS_LogInit();
+    }
+
+    ~AutoLogger()
+    {
+        NS_LogTerm();
+    }
+};
+
 int
 main(int argc, char **argv, char **envp)
 {
 #ifdef XP_MACOSX
     InitAutoreleasePool();
 #endif
+
+    AutoLogger log;
+
     JSRuntime *rt;
     JSContext *cx;
     JSObject *glob, *envobj;