Skip to content

Commit

Permalink
Merge pull request #221 from tonlabs/0.44.3-rc
Browse files Browse the repository at this point in the history
FIX: didn't write error messages to log
  • Loading branch information
d3p authored Oct 25, 2021
2 parents cb02557 + c53d32b commit 02ffb8a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
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

0 comments on commit 02ffb8a

Please sign in to comment.