File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
packages/sds/src/message_channel Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1+ import { Logger } from "@waku/utils" ;
12import _ from "lodash" ;
23
34import { type ChannelId , ContentMessage , isContentMessage } from "./message.js" ;
@@ -53,6 +54,8 @@ export type MemLocalHistoryOptions = {
5354 maxSize ?: number ;
5455} ;
5556
57+ const log = new Logger ( "sds:local-history" ) ;
58+
5659export class MemLocalHistory implements ILocalHistory {
5760 private items : ContentMessage [ ] = [ ] ;
5861 private readonly storage ?: PersistentStorage ;
@@ -70,10 +73,13 @@ export class MemLocalHistory implements ILocalHistory {
7073 this . maxSize = maxSize ?? DEFAULT_MAX_LENGTH ;
7174 if ( storage instanceof PersistentStorage ) {
7275 this . storage = storage ;
76+ log . info ( "Using explicit persistent storage" ) ;
7377 } else if ( typeof storage === "string" ) {
7478 this . storage = PersistentStorage . create ( storage ) ;
79+ log . info ( "Creating persistent storage for channel" , storage ) ;
7580 } else {
7681 this . storage = undefined ;
82+ log . info ( "Using in-memory storage" ) ;
7783 }
7884
7985 this . load ( ) ;
You can’t perform that action at this time.
0 commit comments