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