Merge pull request #144 from Guation/main

feat: http与ws允许监听同一端口,快速登录允许自动选择QQ号,允许禁用webUI
This commit is contained in:
手瓜一十雪 authored and GitHub committed 2024-07-24 14:09:19 +08:00
commit 95f16ebc8c
7 files changed
+129 -53

No files matched your search

+4 -2
View File
@@ -91,8 +91,10 @@ export function enableConsoleLog(enable: boolean) {
function formatMsg(msg: any[]) {
let logMsg = '';
for (const msgItem of msg) {
// 判断是否是对象
if (typeof msgItem === 'object') {
if (msgItem instanceof Error) { // 判断是否是错误
logMsg += msgItem.stack + ' ';
continue;
} else if (typeof msgItem === 'object') { // 判断是否是对象
const obj = JSON.parse(JSON.stringify(msgItem, null, 2));
logMsg += JSON.stringify(truncateString(obj)) + ' ';
continue;