annotate src/implab/components/ConsoleLogChannel.js @ 1:93fb6c09f2e1

minor fixes
author cin
date Fri, 02 Jun 2017 18:15:22 +0300
parents fc2517695ee1
children 00779cb63b12
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
1 define(
1
93fb6c09f2e1 minor fixes
cin
parents: 0
diff changeset
2 [ "dojo/_base/declare", "../text/format" ],
0
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
3 function(declare, format) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
4 return declare(
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
5 null,
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
6 {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
7 name : null,
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
8
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
9 constructor : function(name) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
10 this.name = name;
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
11 },
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
12
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
13 log : function() {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
14 console.log(this._makeMsg(arguments));
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
15 },
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
16
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
17 warn : function() {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
18 console.warn(this._makeMsg(arguments));
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
19 },
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
20
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
21 error : function() {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
22 console.error(this._makeMsg(arguments));
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
23 },
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
24
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
25 _makeMsg : function(args) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
26 return this.name ? this.name + " " +
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
27 format.apply(null, args) : format.apply(null, args);
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
28 }
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
29 });
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
30 });