mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(socket) log: add msg condition
This commit is contained in:
parent
e9727e21b7
commit
b708b7b687
1 changed files with 8 additions and 6 deletions
|
|
@ -122,12 +122,14 @@ var CloudCmd, Util, DOM, $;
|
|||
function log(msg, status) {
|
||||
var ret;
|
||||
|
||||
Buffer[status] += msg;
|
||||
ret = Util.isContainStr(Buffer[status], '\n');
|
||||
|
||||
if (jqconsole && ret) {
|
||||
jqconsole.Write(Buffer[status], status + '-msg');
|
||||
Buffer[status] = '';
|
||||
if (msg) {
|
||||
Buffer[status] += msg;
|
||||
ret = Util.isContainStr(Buffer[status], '\n');
|
||||
|
||||
if (jqconsole && ret) {
|
||||
jqconsole.Write(Buffer[status], status + '-msg');
|
||||
Buffer[status] = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue