smartlog-destination-local/docs/quicksearch.html

32 lines
3.7 KiB
HTML
Raw Normal View History

<html>
<head>
</head>
<body style="background: transparent;">
<script src="scripts/docstrap.lib.js"></script>
<script src="scripts/lunr.min.js"></script>
<script src="scripts/fulltext-search.js"></script>
<script type="text/x-docstrap-searchdb">
{"global.html":{"id":"global.html","title":"Global","body":" Documentation Global direrrorinfologFunctionoksuccesswarn Global Methods dir(logText) logs an directory to console Parameters: Name Type Description logText Returns: Type boolean error(logText) logs an error to console Parameters: Name Type Description logText Returns: Type boolean info(logText) logs an info to console Parameters: Name Type Description logText Returns: Type boolean logFunction(logText, logType) Parameters: Name Type Description logText logType Returns: Type boolean ok(logText) logs an 'OK!' message to console Parameters: Name Type Description logText Returns: Type boolean success(logText) logs a success to console Parameters: Name Type Description logText string to log as error Returns: Type boolean warn(logText) logs a 'warn:' message to console Parameters: Name Type Description logText string to log as error Returns: Type boolean × Search results Close Documentation generated by JSDoc 3.4.0 on 2016-04-04T22:36:17+02:00 using the DocStrap template. "},"index.html":{"id":"index.html","title":"Index","body":" Documentation Global direrrorinfologFunctionoksuccesswarn beautylogbeautiful logging Status Usage ### Simple Logging var bl = require('beautylog'); //for use in OS console environment AND browser console bl.log('some log message'); //normal console log message bl.success('some success message'); //success console log message bl.error('some error message'); //error console log message //alternatively you can use a logType parameter bl.log('some log message','normal'); bl.log('some success message','success'); bl.log('some error message','error');The plugin produces beautiful output like this: Code HighlightingConsole Tablesbeautylog allows displaying data in nice tables for better overview. There are different types of tables. Customvar bl = require('beautylog')(&quot;os&quot;); //for use in OS console environment var myTable = bl.table.new(&quot;custom&quot;,[&quot;Heading1&quot;.blue,&quot;Heading2&quot;.blue,&quot;Heading3&quot;.blue]); // type &quot;custom&quot; myTable.push([&quot;check 1&quot;,&quot;success&quot;]); // adds a row the myTable myTable.push([&quot;check 2&quot;,&quot;error&quot;]); // adds a row the myTable myTable.push([&quot;check 3&quot;,&quot;error&quot;]); // adds a row the myTable myTable.print(); //prints myTable to the consoleChecksvar bl = require('beautylog')(&quot;os&quot;); //for use in OS console environment var myTable = bl.table.new(&quot;checks&quot;); // type checks myTable.push([&quot;check 1&quot;,&quot;success&quot;]); // adds a row the myTable myTable.push([&quot;check 2&quot;,&quot;error&quot;]); // adds a row the myTable myTable.push([&quot;check 3&quot;,&quot;error&quot;]); // adds a row the myTable myTable.print(); //prints myTable to the consoleThe table from the code with type &quot;checks&quot; above looks like this: × Search results Close Documentation generated by JSDoc 3.4.0 on 2016-04-04T22:36:17+02:00 using the DocStrap template. "}}
</script>
<script type="text/javascript">
$(document).ready(function() {
Searcher.init();
});
$(window).on("message", function(msg) {
var msgData = msg.originalEvent.data;
if (msgData.msgid != "docstrap.quicksearch.start") {
return;
}
var results = Searcher.search(msgData.searchTerms);
window.parent.postMessage({"results": results, "msgid": "docstrap.quicksearch.done"}, "*");
});
</script>
</body>
</html>