Mercurial > pub > ImplabJs
comparison core/src/js/log/ConsoleLogChannel.js @ 29:acdcdf1a8d21
repository reorganized
author | cin |
---|---|
date | Tue, 26 Jun 2018 19:35:44 +0300 |
parents | src/implab/log/ConsoleLogChannel.js@7d7059d2a810 |
children |
comparison
equal
deleted
inserted
replaced
28:d796bbbe558c | 29:acdcdf1a8d21 |
---|---|
1 define( | |
2 [ "dojo/_base/declare", "../text/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 }); |