Skip to content

Commit 55e5e87

Browse files
committed
feat: stringify objects in log
1 parent 442dda7 commit 55e5e87

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

electron/main/game/game.service.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ export class GameServiceImpl implements GameService {
145145

146146
stream$.subscribe({
147147
next: (data: T) => {
148-
fileWriteStream.write(`---\n${data}`);
148+
if (typeof data === 'object') {
149+
fileWriteStream.write(`---\n${JSON.stringify(data, null, 2)}`);
150+
} else {
151+
fileWriteStream.write(`---\n${data}`);
152+
}
149153
},
150154
error: () => {
151155
fileWriteStream.end();

0 commit comments

Comments
 (0)