feature(console) make private log, error

This commit is contained in:
coderaiser 2014-05-20 05:19:48 -04:00
parent e06041f613
commit 9a902fc1cf

View file

@ -12,6 +12,10 @@ var CloudCmd, Util, DOM, CloudFunc, $;
},
Loading,
jqconsole,
log = Util.bind(write, 'log'),
error = Util.bind(write, 'error'),
Element,
MouseBinded,
Socket,
@ -40,8 +44,6 @@ var CloudCmd, Util, DOM, CloudFunc, $;
}
this.show = show;
this.log = log;
this.error = error;
function show(callback) {
if (!Loading) {
@ -112,15 +114,7 @@ var CloudCmd, Util, DOM, CloudFunc, $;
}
}
function log(pText) {
write(pText, 'log');
}
function error(pText) {
write(pText, 'error');
}
function write(msg, status) {
function write(status, msg) {
var isContain;
if (msg) {
@ -179,6 +173,7 @@ var CloudCmd, Util, DOM, CloudFunc, $;
function onMessage(json) {
if (json) {
Util.log(json);
log(json.stdout);
error(json.stderr);
}