mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
serialize logs as json
This commit is contained in:
parent
4defbe1322
commit
48569c28bc
@ -105,7 +105,7 @@ export class IDBLogger extends BaseLogger {
|
|||||||
this._itemCounter += 1;
|
this._itemCounter += 1;
|
||||||
this._queuedItems.push({
|
this._queuedItems.push({
|
||||||
id: `${encodeUint64(serializedItem.s)}:${this._itemCounter}`,
|
id: `${encodeUint64(serializedItem.s)}:${this._itemCounter}`,
|
||||||
tree: serializedItem
|
json: JSON.stringify(serializedItem)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ class IDBLogExport {
|
|||||||
asBlob() {
|
asBlob() {
|
||||||
const log = {
|
const log = {
|
||||||
version: 1,
|
version: 1,
|
||||||
items: this._items
|
items: this._items.map(i => JSON.parse(i.json))
|
||||||
};
|
};
|
||||||
const json = JSON.stringify(log);
|
const json = JSON.stringify(log);
|
||||||
const buffer = this._platform.encoding.utf8.encode(json);
|
const buffer = this._platform.encoding.utf8.encode(json);
|
||||||
|
Loading…
Reference in New Issue
Block a user