JSFiddle - React, Tailwind, and code Playground
by plantface
HTML
<script src="https://code.angularjs.org/1.3.9/angular.js"></script>
<script src="https://cdn.rawgit.com/alexei/sprintf.js/master/dist/sprintf.min.js"></script>
<script src="https://cdn.rawgit.com/better-js-logging/angular-logger/master/dist/angular-logger.min.js"></script>
<div ng-app="app">
</div>
JavaScript
var app = angular.module('app', ['angular-logger']);
app.run(function($log) {
var logger = $log.getInstance('test');
logger.info("This is a regular string");
logger.info("This has multiple", "(complex) arguments", { a: 'b' }, ['this', 'should', 'be', 'passed', 'through', { 'a': 'b' }]);
logger.info("This has a placeholder: [%s]");
logger.info("This has a placeholder with [%s]", "arguments");
logger.info("This has a placeholder with [%s] [%s] - [%j]", "multiple", "arguments", { a: 'b' }, ['this', 'should', 'be', 'passed', 'through', { 'a': 'b' }]);
logger.warn("This %s pattern %j", "is", "{ 'in': 'put' }", "but this is not!", ['this', 'is handled', 'by the browser'], { 'including': 'syntax highlighting', 'and': 'console interaction' });
logger.info("This has a placeholder with [%s]", function() { return "function output"; });
logger.info("This has a placeholder with [%j]", function() { return {n:"function output"}; });
});