mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
feat: debug日志输出网络请求
Some checks failed
Build and push Docker images / docker (push) Has been cancelled
Mirror and run GitLab CI / build (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, linux) (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, macos) (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, win) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (alpine) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linux) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linuxstatic) (push) Has been cancelled
Some checks failed
Build and push Docker images / docker (push) Has been cancelled
Mirror and run GitLab CI / build (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, linux) (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, macos) (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, win) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (alpine) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linux) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linuxstatic) (push) Has been cancelled
This commit is contained in:
parent
acd2121d97
commit
d3cc24c43b
@ -98,8 +98,8 @@ function get({ url, config, contents, query }) {
|
||||
},
|
||||
query,
|
||||
contents,
|
||||
success: res => resolve(res.body),
|
||||
failure: err => resolve(err)
|
||||
success: res => resolve(log.debug_return(url, res.body)),
|
||||
failure: err => resolve(log.debug_return(url, err))
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -122,8 +122,8 @@ function post({ url, config, contents, query }) {
|
||||
},
|
||||
query,
|
||||
contents,
|
||||
success: res => resolve(res.body),
|
||||
failure: err => resolve(err)
|
||||
success: res => resolve(log.debug_return(url, res.body)),
|
||||
failure: err => resolve(log.debug_return(url, err))
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -242,6 +242,10 @@ const utils = {
|
||||
this.proPrint(color_text_pair.map(([color, text]) => color(text)));
|
||||
}
|
||||
},
|
||||
debug_return(context, obj) {
|
||||
this.debug(context, obj);
|
||||
return obj;
|
||||
},
|
||||
info(context, msg) {
|
||||
if (this._level >= 3) {
|
||||
let color_text_pair = [
|
||||
@ -555,4 +559,4 @@ const utils = {
|
||||
};
|
||||
|
||||
|
||||
module.exports = utils;
|
||||
module.exports = utils;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user