javascript - Modify UI of Log4Javascript -
i have log4javascript setup displays log follows:
however, rid off stuff, , instead ui below:
how can done? using inpageappender
i'm not sure if there's config option, this jsfiddle might started:
html
there's delayed log.debug
here check hiding of toolbars doesn't break logging.
<script src="http://log4javascript.org/js/log4javascript.js"></script> <script type="text/javascript"> var log = log4javascript.getlogger("main"); var appender = new log4javascript.inpageappender(); log.addappender(appender); log.debug("this debugging message log4javascript in-page page"); settimeout(function() { log.debug("this debugging message log4javascript in-page page"); }, 2000); </script>
js
this code waits until log4javascript
load
event has fired, , hides toolbars.
function removeswitchescontainers() { var iframes = document.queryselectorall("iframe"); iframes = array.prototype.slice.call(iframes); iframes.filter(function (iframe) { return iframe.id && iframe.id.match(/log4javascript_\d+_\d+_inpageappender_\d+/); }); if (iframes.length < 1) { return; } var iframe = iframes[0]; var sc = iframe.contentwindow.document.queryselectorall("#switchescontainer"); sc = array.prototype.slice.call(sc); sc.foreach(function (switchescontainer) { switchescontainer.style.display = "none"; }); } log4javascript.addeventlistener("load", removeswitchescontainers);
Comments
Post a Comment