mirror of
https://github.com/mathew-kurian/Scribe.js
synced 2025-04-27 15:54:59 +00:00
Add working example of console2 methods
This commit is contained in:
parent
83243b9718
commit
c8610e29b0
1 changed files with 28 additions and 0 deletions
28
examples/console2.js
Normal file
28
examples/console2.js
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
/*jshint -W079 */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Console2 functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
var scribe = require('../scribe'), //loads Scribe
|
||||||
|
console = process.console; //create a local (for the module) console
|
||||||
|
|
||||||
|
scribe.config({});
|
||||||
|
|
||||||
|
console.addLogger('log');
|
||||||
|
|
||||||
|
console.log("Hello");
|
||||||
|
|
||||||
|
console.time().log("Print the full time");
|
||||||
|
console.date().log("Just print the date");
|
||||||
|
console.tag("Tag1", 123).log("Some Tag");
|
||||||
|
console.file().log("Print the file and the line of the call");
|
||||||
|
console.log({just : 'an object'});
|
||||||
|
console.log(
|
||||||
|
"Print many things",
|
||||||
|
{ key1 : "val 1", key2 : { a: "b", c : []}, key3 : [1234]},
|
||||||
|
['an array'],
|
||||||
|
"A String"
|
||||||
|
);
|
||||||
|
|
||||||
|
console.tag("Combo!").time().file().log("A combo");
|
Loading…
Add table
Reference in a new issue