diff --git a/apps/html/index.html b/apps/html/index.html index eee446ce2e..6e93798620 100644 --- a/apps/html/index.html +++ b/apps/html/index.html @@ -1,4 +1,4 @@ - + @@ -62,7 +62,7 @@ - (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Tue, 06 Feb 2024 21:02:40 GMT + (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Thu, 08 Feb 2024 14:41:27 GMT diff --git a/apps/react/src/app/app.tsx b/apps/react/src/app/app.tsx index dd9ad5ac5e..fceae3c757 100644 --- a/apps/react/src/app/app.tsx +++ b/apps/react/src/app/app.tsx @@ -1879,7 +1879,7 @@ pre { `, }} /> - (REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Tue, 06 Feb 2024 21:02:41 GMT + (REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Thu, 08 Feb 2024 14:41:27 GMT
diff --git a/packages/constants/src/lib/constants/autogen_internal.ts b/packages/constants/src/lib/constants/autogen_internal.ts index 8f4cf6d176..a98eac7638 100644 --- a/packages/constants/src/lib/constants/autogen_internal.ts +++ b/packages/constants/src/lib/constants/autogen_internal.ts @@ -1,4 +1,4 @@ -// Last Modified: 2024-02-06 21:00:54 +// Last Modified: 2024-02-08 14:39:50 // This file is auto-generated by tools/scripts/gen-internal-dev.mjs export const INTERNAL_DEV = [ 'https://167.114.17.204:443', diff --git a/packages/logger/src/lib/logger.spec.ts b/packages/logger/src/lib/logger.spec.ts index 574e50ddad..55b0772618 100644 --- a/packages/logger/src/lib/logger.spec.ts +++ b/packages/logger/src/lib/logger.spec.ts @@ -92,7 +92,7 @@ describe('logger', () => { }); it('should persist logs across categories', async () => { - const count = 1_000; + const count = 10_000; for (let i = 0; i < count; i++) { const logger = lm.get('' + i, 'foo6'); logger.setLevel(LogLevel.DEBUG); diff --git a/packages/logger/src/lib/logger.ts b/packages/logger/src/lib/logger.ts index c73d8c6eb0..a6059a9b15 100644 --- a/packages/logger/src/lib/logger.ts +++ b/packages/logger/src/lib/logger.ts @@ -342,7 +342,12 @@ export class Logger { private _addLog(log: Log) { this._logs.push(log); - log.id && this._addToLocalStorage(log); + + // TODO: currently we are not deleting old request id's which over time will fill local storage as the maximum storage size is 10mb + // we should be deleting keys from the front of the collection of `Object.keys(category)` such that the first keys entered are deleted when we reach a pre defined key threshold + // this implementation assumes that serialization / deserialization from `localStorage` keeps the same key ordering in each `category` object as we will asssume the array produced from `Object.keys` will always be the same ordering. + // which then allows us to start at the front of the array and do `delete` operation on each key we wish to delete from the object. + //log.id && this._addToLocalStorage(log); } private _addToLocalStorage(log: Log) {