Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: didn't write error messages to log #221

Merged
merged 1 commit into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [0.44.3] - 2021-10-25

### Fix

- q-server didn't write error messages to log

## [0.44.2] - 2021-10-22

### Fix
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ton-q-server",
"version": "0.44.2",
"version": "0.44.3",
"description": "TON Q Server – realtime queries over TON blockchain.",
"main": "index.js",
"repository": "[email protected]:tonlabs/ton-q-server.git",
Expand Down
9 changes: 8 additions & 1 deletion src/server/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ export interface QLog {
}

function str(arg: unknown): string {
const s = typeof arg === "string" ? arg : toJSON(arg);
let s;
if (arg instanceof Error) {
s = arg.message || arg.toString();
} else if (typeof arg === "string") {
s = arg;
} else {
s = toJSON(arg);
}
return s.split("\n").join("\\n").split("\t").join("\\t");
}

Expand Down