add the logger property to the null logger as well, forgot this before

This commit is contained in:
Bruno Windels 2021-09-21 20:58:50 +02:00
parent 2d2521cd9a
commit 0d486a14f6
2 changed files with 7 additions and 3 deletions

View file

@ -20,7 +20,7 @@ function noop () {}
export class NullLogger {
constructor() {
this.item = new NullLogItem();
this.item = new NullLogItem(this);
}
log() {}
@ -51,6 +51,10 @@ export class NullLogger {
}
export class NullLogItem {
constructor(logger) {
this.logger = logger;
}
wrap(_, callback) {
return callback(this);
}

View file

@ -16,8 +16,8 @@ limitations under the License.
import {FDBFactory, FDBKeyRange} from "../../lib/fake-indexeddb/index.js";
import {StorageFactory} from "../matrix/storage/idb/StorageFactory";
import {NullLogItem} from "../logging/NullLogger.js";
import {Instance as nullLogger} from "../logging/NullLogger.js";
export function createMockStorage() {
return new StorageFactory(null, new FDBFactory(), FDBKeyRange).create(1, new NullLogItem());
return new StorageFactory(null, new FDBFactory(), FDBKeyRange).create(1, nullLogger.item);
}