mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-24 00:21:18 +00:00
feature(console) make private log, error
This commit is contained in:
parent
e06041f613
commit
9a902fc1cf
1 changed files with 6 additions and 11 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue