Enable default logger in debug frameworks. Add configurable options to index-debug.html.

This commit is contained in:
Tom Robinson committed 2010-03-30 14:12:59 -07:00
1 parent 2bf16da441
commit 0b3264a99d
8 files changed
+28 -5

No files matched your search

+7
View File
@@ -357,3 +357,10 @@ function _CPLogInitPopup(logWindow)
}, false);
}
#endif
#if COMMONJS
CPLogDefault = CPLogPrint;
#else
CPLogDefault = (typeof window === "object" && window.console) ? CPLogConsole : CPLogPopup;
#endif
+2
View File
@@ -20,6 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
CPLogRegister(CPLogDefault);
// formatting helpers
function objj_debug_object_format(aReceiver)
@@ -35,6 +35,13 @@
// Uncomment (along with both above) to print backtraces on type check errors:
//objj_typecheck_prints_backtrace = true;
// Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise):
//CPLogUnregister(CPLogDefault);
// Uncomment to enable a specific logger:
//CPLogRegister(CPLogConsole);
//CPLogRegister(CPLogPopup);
</script>
<style type="text/css">
@@ -19,7 +19,7 @@
OBJJ_MAIN_FILE = "main.j";
</script>
<script src="Frameworks/Objective-J/Objective-J.js" type = "text/javascript"></script>
<script src="Frameworks/Objective-J/Objective-J.js" type="text/javascript"></script>
<style type="text/css">
body{margin:0; padding:0;}
@@ -20,7 +20,7 @@
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"];
</script>
<script src="Frameworks/Debug/Objective-J/Objective-J.js" type = "text/javascript"></script>
<script src="Frameworks/Debug/Objective-J/Objective-J.js" type="text/javascript"></script>
<script type="text/javascript">
objj_msgSend_reset();
@@ -35,6 +35,13 @@
// Uncomment (along with both above) to print backtraces on type check errors:
//objj_typecheck_prints_backtrace = true;
// Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise):
//CPLogUnregister(CPLogDefault);
// Uncomment to enable a specific logger:
//CPLogRegister(CPLogConsole);
//CPLogRegister(CPLogPopup);
</script>
<style type="text/css">
@@ -19,7 +19,7 @@
OBJJ_MAIN_FILE = "main.j";
</script>
<script src="Frameworks/Objective-J/Objective-J.js" type = "text/javascript"></script>
<script src="Frameworks/Objective-J/Objective-J.js" type="text/javascript"></script>
<style type="text/css">
body{margin:0; padding:0;}
@@ -20,7 +20,7 @@
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"];
</script>
<script src="Frameworks/Debug/Objective-J/Objective-J.js" type = "text/javascript"></script>
<script src="Frameworks/Debug/Objective-J/Objective-J.js" type="text/javascript"></script>
<style type="text/css">
body{margin:0; padding:0;}
@@ -19,7 +19,7 @@
OBJJ_MAIN_FILE = "main.j";
</script>
<script src="Frameworks/Objective-J/Objective-J.js" type = "text/javascript"></script>
<script src="Frameworks/Objective-J/Objective-J.js" type="text/javascript"></script>
<style type="text/css">
body{margin:0; padding:0;}