shell-loginit
author Benjamin Smedberg <benjamin@smedbergs.us>
Tue, 10 Jun 2008 15:02:52 -0400
changeset 125 ed7d306bd129b107164a8121618c28e7a64d68d0
parent 108 33529a5c309fd85dad4adb0f672eaeb6493195ad
permissions -rw-r--r--
Merge forward! Things are looking good!

* * *

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;