forked from mystiq/hydrogen-web
add the logger property to the null logger as well, forgot this before
This commit is contained in:
parent
2d2521cd9a
commit
0d486a14f6
2 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue