From 48569c28bc2e44433bd9b7ce048f473f63b24d44 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 16 Feb 2021 15:08:08 +0100 Subject: [PATCH] serialize logs as json --- src/logging/IDBLogger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logging/IDBLogger.js b/src/logging/IDBLogger.js index 1ac09c74..10e51f15 100644 --- a/src/logging/IDBLogger.js +++ b/src/logging/IDBLogger.js @@ -105,7 +105,7 @@ export class IDBLogger extends BaseLogger { this._itemCounter += 1; this._queuedItems.push({ id: `${encodeUint64(serializedItem.s)}:${this._itemCounter}`, - tree: serializedItem + json: JSON.stringify(serializedItem) }); } @@ -192,7 +192,7 @@ class IDBLogExport { asBlob() { const log = { version: 1, - items: this._items + items: this._items.map(i => JSON.parse(i.json)) }; const json = JSON.stringify(log); const buffer = this._platform.encoding.utf8.encode(json);