Mercurial > pub > ImplabJs
comparison src/implab/components/ConsoleLogChannel.js @ 0:fc2517695ee1
Initial commit, draft import of existing work
author | cin |
---|---|
date | Thu, 01 Jun 2017 13:20:03 +0300 |
parents | |
children | 93fb6c09f2e1 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:fc2517695ee1 |
---|---|
1 define( | |
2 [ "dojo/_base/declare", "./format" ], | |
3 function(declare, format) { | |
4 return declare( | |
5 null, | |
6 { | |
7 name : null, | |
8 | |
9 constructor : function(name) { | |
10 this.name = name; | |
11 }, | |
12 | |
13 log : function() { | |
14 console.log(this._makeMsg(arguments)); | |
15 }, | |
16 | |
17 warn : function() { | |
18 console.warn(this._makeMsg(arguments)); | |
19 }, | |
20 | |
21 error : function() { | |
22 console.error(this._makeMsg(arguments)); | |
23 }, | |
24 | |
25 _makeMsg : function(args) { | |
26 return this.name ? this.name + " " + | |
27 format.apply(null, args) : format.apply(null, args); | |
28 } | |
29 }); | |
30 }); |