Skip to content

Commit

Permalink
chore: 调整部分日志
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Aug 29, 2023
1 parent 25ec219 commit 336ddd6
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.43",
"version": "2.14.44",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion backend/src/core/proxy-utils/parsers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ function URI_VMess() {
// V2rayN URI format
params = JSON.parse(content);
} catch (e) {
// console.error(e);
// Shadowrocket URI format
// eslint-disable-next-line no-unused-vars
let [__, base64Line, qs] = /(^[^?]+?)\/?\?(.*)$/.exec(line);
Expand Down
1 change: 0 additions & 1 deletion backend/src/core/proxy-utils/processors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ const DOMAIN_RESOLVERS = {
},
});
const answers = resp.body.split(';').map((i) => i.split(',')[0]);
console.log(`answers`, answers);
if (answers.length === 0) {
throw new Error('No answers');
}
Expand Down
2 changes: 1 addition & 1 deletion backend/src/core/rule-utils/parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function AllRuleParser() {
}
if (!matched) throw new Error('Invalid rule type: ' + rawType);
} catch (e) {
console.error(`Failed to parse line: ${line}\n Reason: ${e}`);
console.log(`Failed to parse line: ${line}\n Reason: ${e}`);
}
}
return result;
Expand Down
3 changes: 2 additions & 1 deletion backend/src/restful/miscs.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ async function gistBackup(req, res) {
$.cache = content;
$.persistCache();
}
// perform migration after restoring from gist
$.info(`perform migration after restoring from gist...`);
migrate();
$.info(`migration completed`);
$.info(`还原备份完成`);
break;
}
Expand Down
14 changes: 11 additions & 3 deletions backend/src/restful/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ export async function updateGitHubAvatar() {
.then((resp) => JSON.parse(resp.body));
settings.avatarUrl = data['avatar_url'];
$.write(settings, SETTINGS_KEY);
} catch (e) {
$.error('Failed to fetch GitHub avatar for User: ' + username);
} catch (err) {
$.error(
`Failed to fetch GitHub avatar for User: ${username}. Reason: ${
err.message ?? err
}`,
);
}
}
}
Expand All @@ -67,7 +71,11 @@ export async function updateArtifactStore() {
$.write(settings, SETTINGS_KEY);
}
} catch (err) {
$.error('Failed to fetch artifact store for User: ' + githubUser);
$.error(
`Failed to fetch artifact store for User: ${githubUser}. Reason: ${
err.message ?? err
}`,
);
}
}
}

0 comments on commit 336ddd6

Please sign in to comment.