@fluidframework/core-interfaces 2.93.0 → 2.101.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/api-report/core-interfaces.beta.api.md +12 -5
- package/api-report/core-interfaces.legacy.alpha.api.md +12 -5
- package/api-report/core-interfaces.legacy.beta.api.md +12 -5
- package/api-report/core-interfaces.legacy.public.api.md +12 -5
- package/api-report/core-interfaces.public.api.md +12 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.alpha.d.ts +1 -0
- package/dist/legacy.d.ts +1 -0
- package/dist/logger.d.ts +40 -4
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +7 -4
- package/dist/logger.js.map +1 -1
- package/dist/public.d.ts +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.alpha.d.ts +1 -0
- package/lib/legacy.d.ts +1 -0
- package/lib/logger.d.ts +40 -4
- package/lib/logger.d.ts.map +1 -1
- package/lib/logger.js +7 -4
- package/lib/logger.js.map +1 -1
- package/lib/public.d.ts +1 -0
- package/package.json +3 -3
- package/src/index.ts +1 -0
- package/src/logger.ts +54 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @fluidframework/core-interfaces
|
|
2
2
|
|
|
3
|
+
## 2.101.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Deprecate LogLevel.default and LogLevel.error ([#27207](https://github.com/microsoft/FluidFramework/pull/27207)) [77ef3355fdf](https://github.com/microsoft/FluidFramework/commit/77ef3355fdf9611524cad86f00b1ce8ba3263861)
|
|
8
|
+
|
|
9
|
+
`LogLevel.default` and `LogLevel.error` in `@fluidframework/core-interfaces` are deprecated in favor of the semantically clearer `LogLevel.info` and `LogLevel.essential`.
|
|
10
|
+
|
|
11
|
+
#### Migration
|
|
12
|
+
|
|
13
|
+
The recommended replacement for `LogLevel.default` depends on how the value is used:
|
|
14
|
+
- For an **event's default `logLevel`** (e.g. the `logLevel` argument to `ITelemetryBaseLogger.send`), the recommendation is `LogLevel.essential`.
|
|
15
|
+
- For a logger's **default `minLogLevel`** (the threshold that filters events), `LogLevel.info` is the recommendation.
|
|
16
|
+
|
|
17
|
+
The replacement for `LogLevel.error` should always be `LogLevel.essential`.
|
|
18
|
+
|
|
19
|
+
See [issue #26969](https://github.com/microsoft/FluidFramework/issues/26969) for full guidance and removal tracking (planned for v3.0).
|
|
20
|
+
|
|
21
|
+
## 2.100.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- Node 22 is now the minimum supported Node.js version ([#27116](https://github.com/microsoft/FluidFramework/pull/27116)) [e8214d29663](https://github.com/microsoft/FluidFramework/commit/e8214d29663f5ee98d737daed82506a25d8de8d0)
|
|
26
|
+
|
|
27
|
+
All Fluid Framework client packages now require Node.js 22 or later. This aligns with the standing Node upgrade policy as Node 20 reaches end-of-life on April 30, 2026.
|
|
28
|
+
|
|
3
29
|
## 2.93.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
@@ -326,15 +326,22 @@ export type Listeners<T extends object> = {
|
|
|
326
326
|
};
|
|
327
327
|
|
|
328
328
|
// @public
|
|
329
|
-
export const LogLevel:
|
|
330
|
-
readonly verbose: 10;
|
|
331
|
-
readonly default: 20;
|
|
332
|
-
readonly error: 30;
|
|
333
|
-
};
|
|
329
|
+
export const LogLevel: LogLevelConst;
|
|
334
330
|
|
|
335
331
|
// @public
|
|
336
332
|
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
337
333
|
|
|
334
|
+
// @public
|
|
335
|
+
export interface LogLevelConst {
|
|
336
|
+
// @deprecated
|
|
337
|
+
readonly default: 20;
|
|
338
|
+
// @deprecated
|
|
339
|
+
readonly error: 30;
|
|
340
|
+
readonly essential: 30;
|
|
341
|
+
readonly info: 20;
|
|
342
|
+
readonly verbose: 10;
|
|
343
|
+
}
|
|
344
|
+
|
|
338
345
|
// @public
|
|
339
346
|
export type Off = () => void;
|
|
340
347
|
|
|
@@ -471,15 +471,22 @@ export type Listeners<T extends object> = {
|
|
|
471
471
|
};
|
|
472
472
|
|
|
473
473
|
// @public
|
|
474
|
-
export const LogLevel:
|
|
475
|
-
readonly verbose: 10;
|
|
476
|
-
readonly default: 20;
|
|
477
|
-
readonly error: 30;
|
|
478
|
-
};
|
|
474
|
+
export const LogLevel: LogLevelConst;
|
|
479
475
|
|
|
480
476
|
// @public
|
|
481
477
|
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
482
478
|
|
|
479
|
+
// @public
|
|
480
|
+
export interface LogLevelConst {
|
|
481
|
+
// @deprecated
|
|
482
|
+
readonly default: 20;
|
|
483
|
+
// @deprecated
|
|
484
|
+
readonly error: 30;
|
|
485
|
+
readonly essential: 30;
|
|
486
|
+
readonly info: 20;
|
|
487
|
+
readonly verbose: 10;
|
|
488
|
+
}
|
|
489
|
+
|
|
483
490
|
// @public
|
|
484
491
|
export type Off = () => void;
|
|
485
492
|
|
|
@@ -458,15 +458,22 @@ export type Listeners<T extends object> = {
|
|
|
458
458
|
};
|
|
459
459
|
|
|
460
460
|
// @public
|
|
461
|
-
export const LogLevel:
|
|
462
|
-
readonly verbose: 10;
|
|
463
|
-
readonly default: 20;
|
|
464
|
-
readonly error: 30;
|
|
465
|
-
};
|
|
461
|
+
export const LogLevel: LogLevelConst;
|
|
466
462
|
|
|
467
463
|
// @public
|
|
468
464
|
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
469
465
|
|
|
466
|
+
// @public
|
|
467
|
+
export interface LogLevelConst {
|
|
468
|
+
// @deprecated
|
|
469
|
+
readonly default: 20;
|
|
470
|
+
// @deprecated
|
|
471
|
+
readonly error: 30;
|
|
472
|
+
readonly essential: 30;
|
|
473
|
+
readonly info: 20;
|
|
474
|
+
readonly verbose: 10;
|
|
475
|
+
}
|
|
476
|
+
|
|
470
477
|
// @public
|
|
471
478
|
export type Off = () => void;
|
|
472
479
|
|
|
@@ -326,15 +326,22 @@ export type Listeners<T extends object> = {
|
|
|
326
326
|
};
|
|
327
327
|
|
|
328
328
|
// @public
|
|
329
|
-
export const LogLevel:
|
|
330
|
-
readonly verbose: 10;
|
|
331
|
-
readonly default: 20;
|
|
332
|
-
readonly error: 30;
|
|
333
|
-
};
|
|
329
|
+
export const LogLevel: LogLevelConst;
|
|
334
330
|
|
|
335
331
|
// @public
|
|
336
332
|
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
337
333
|
|
|
334
|
+
// @public
|
|
335
|
+
export interface LogLevelConst {
|
|
336
|
+
// @deprecated
|
|
337
|
+
readonly default: 20;
|
|
338
|
+
// @deprecated
|
|
339
|
+
readonly error: 30;
|
|
340
|
+
readonly essential: 30;
|
|
341
|
+
readonly info: 20;
|
|
342
|
+
readonly verbose: 10;
|
|
343
|
+
}
|
|
344
|
+
|
|
338
345
|
// @public
|
|
339
346
|
export type Off = () => void;
|
|
340
347
|
|
|
@@ -326,15 +326,22 @@ export type Listeners<T extends object> = {
|
|
|
326
326
|
};
|
|
327
327
|
|
|
328
328
|
// @public
|
|
329
|
-
export const LogLevel:
|
|
330
|
-
readonly verbose: 10;
|
|
331
|
-
readonly default: 20;
|
|
332
|
-
readonly error: 30;
|
|
333
|
-
};
|
|
329
|
+
export const LogLevel: LogLevelConst;
|
|
334
330
|
|
|
335
331
|
// @public
|
|
336
332
|
export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
337
333
|
|
|
334
|
+
// @public
|
|
335
|
+
export interface LogLevelConst {
|
|
336
|
+
// @deprecated
|
|
337
|
+
readonly default: 20;
|
|
338
|
+
// @deprecated
|
|
339
|
+
readonly error: 30;
|
|
340
|
+
readonly essential: 30;
|
|
341
|
+
readonly info: 20;
|
|
342
|
+
readonly verbose: 10;
|
|
343
|
+
}
|
|
344
|
+
|
|
338
345
|
// @public
|
|
339
346
|
export type Off = () => void;
|
|
340
347
|
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { IFluidLoadable } from "./fluidLoadable.js";
|
|
|
13
13
|
export type { IRequest, IRequestHeader, IResponse } from "./fluidRouter.js";
|
|
14
14
|
export type { IFluidHandleErased, IFluidHandleEvents, IFluidHandleInternal, IFluidHandleInternalPayloadPending, IFluidHandlePayloadPending, ILocalFluidHandle, ILocalFluidHandleEvents, IProvideFluidHandle, IProvideFluidHandleContext, PayloadState, } from "./handles.js";
|
|
15
15
|
export { IFluidHandleContext, IFluidHandle, fluidHandleSymbol } from "./handles.js";
|
|
16
|
-
export type { ILoggingError, ITelemetryBaseEvent, ITelemetryBaseLogger, ITelemetryBaseProperties, Tagged, TelemetryBaseEventPropertyType, } from "./logger.js";
|
|
16
|
+
export type { ILoggingError, ITelemetryBaseEvent, ITelemetryBaseLogger, ITelemetryBaseProperties, LogLevelConst, Tagged, TelemetryBaseEventPropertyType, } from "./logger.js";
|
|
17
17
|
export { LogLevel } from "./logger.js";
|
|
18
18
|
export type { FluidObjectProviderKeys, FluidObject, FluidObjectKeys } from "./provider.js";
|
|
19
19
|
export type { ConfigTypes, IConfigProviderBase } from "./config.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,YAAY,EACX,aAAa,EACb,qBAAqB,EACrB,QAAQ,EACR,gBAAgB,GAChB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACX,UAAU,EACV,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,0BAA0B,GAC1B,MAAM,YAAY,CA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AACvC,YAAY,EAAE,uBAAuB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3F,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACpE,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACnE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,YAAY,EACX,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,SAAS,EACT,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,GAAG,GACH,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAoBH,uCAGoB;AAFnB,2GAAA,eAAe,OAAA;AACf,gHAAA,oBAAoB,OAAA;AAerB,uDAAoD;AAA3C,kHAAA,cAAc,OAAA;AAmBvB,2CAAoF;AAA3E,iHAAA,mBAAmB,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAE,+GAAA,iBAAiB,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAoBH,uCAGoB;AAFnB,2GAAA,eAAe,OAAA;AACf,gHAAA,oBAAoB,OAAA;AAerB,uDAAoD;AAA3C,kHAAA,cAAc,OAAA;AAmBvB,2CAAoF;AAA3E,iHAAA,mBAAmB,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAE,+GAAA,iBAAiB,OAAA;AAW7D,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AAKjB,iDAA2D;AAAlD,yHAAA,wBAAwB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type { BrandedType } from \"./brandedType.js\";\n\nexport type { IDisposable } from \"./disposable.js\";\n\nexport type {\n\tFluidIterable,\n\tFluidIterableIterator,\n\tFluidMap,\n\tFluidReadonlyMap,\n} from \"./fluidMap.js\";\n\nexport type {\n\tIErrorBase,\n\tIGenericError,\n\tIUsageError,\n\tIThrottlingWarning,\n\tILayerIncompatibilityError,\n} from \"./error.js\";\nexport {\n\tFluidErrorTypes,\n\tFluidErrorTypesAlpha,\n} from \"./error.js\";\n\nexport type {\n\tExtendEventProvider,\n\tIErrorEvent,\n\tIEvent,\n\tIEventProvider,\n\tIEventThisPlaceHolder,\n\tIEventTransformer,\n\tReplaceIEventThisPlaceHolder,\n\tTransformedEvent,\n} from \"./events.js\";\n\nexport type { IProvideFluidLoadable } from \"./fluidLoadable.js\";\nexport { IFluidLoadable } from \"./fluidLoadable.js\";\n\n// TypeScript forgets the index signature when customers augment IRequestHeader if we export *.\n// So we export the explicit members as a workaround:\n// https://github.com/microsoft/TypeScript/issues/18877#issuecomment-476921038\nexport type { IRequest, IRequestHeader, IResponse } from \"./fluidRouter.js\";\n\nexport type {\n\tIFluidHandleErased,\n\tIFluidHandleEvents,\n\tIFluidHandleInternal,\n\tIFluidHandleInternalPayloadPending,\n\tIFluidHandlePayloadPending,\n\tILocalFluidHandle,\n\tILocalFluidHandleEvents,\n\tIProvideFluidHandle,\n\tIProvideFluidHandleContext,\n\tPayloadState,\n} from \"./handles.js\";\nexport { IFluidHandleContext, IFluidHandle, fluidHandleSymbol } from \"./handles.js\";\n\nexport type {\n\tILoggingError,\n\tITelemetryBaseEvent,\n\tITelemetryBaseLogger,\n\tITelemetryBaseProperties,\n\tLogLevelConst,\n\tTagged,\n\tTelemetryBaseEventPropertyType,\n} from \"./logger.js\";\nexport { LogLevel } from \"./logger.js\";\nexport type { FluidObjectProviderKeys, FluidObject, FluidObjectKeys } from \"./provider.js\";\nexport type { ConfigTypes, IConfigProviderBase } from \"./config.js\";\nexport type { ISignalEnvelope, TypedMessage } from \"./messages.js\";\nexport type { ErasedType, ErasedBaseType, InstanceTypeRelaxed } from \"./erasedType.js\";\nexport { ErasedTypeImplementation } from \"./erasedType.js\";\n\nexport type {\n\tHasListeners,\n\tIEmitter,\n\tIsListener,\n\tListeners,\n\tListenable,\n\tMapGetSet,\n\tNoListenersCallback,\n\tOff,\n} from \"./events/index.js\";\n"]}
|
package/dist/legacy.alpha.d.ts
CHANGED
package/dist/legacy.d.ts
CHANGED
package/dist/logger.d.ts
CHANGED
|
@@ -47,13 +47,49 @@ export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
|
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Specify levels of the logs.
|
|
50
|
+
*
|
|
51
|
+
* @privateRemarks This interface exists solely for documentation. API Extractor does not
|
|
52
|
+
* propagate TSDoc comments from a const's inline type to API reports, so we define the shape
|
|
53
|
+
* here and use LogLevelConst on the LogLevel const to surface member docs.
|
|
54
|
+
*
|
|
50
55
|
* @public
|
|
51
56
|
*/
|
|
52
|
-
export
|
|
57
|
+
export interface LogLevelConst {
|
|
58
|
+
/**
|
|
59
|
+
* Chatty logs useful for debugging.
|
|
60
|
+
* @remarks They need not be collected in production.
|
|
61
|
+
*/
|
|
53
62
|
readonly verbose: 10;
|
|
63
|
+
/**
|
|
64
|
+
* Information about the session.
|
|
65
|
+
* @remarks These logs could be omitted in some sessions if needed (e.g. to reduce overall telemetry volume).
|
|
66
|
+
* If any are collected from a particular session, all should be.
|
|
67
|
+
*/
|
|
68
|
+
readonly info: 20;
|
|
69
|
+
/**
|
|
70
|
+
* Essential information about the operation of Fluid.
|
|
71
|
+
* @remarks It is recommended that these should always be collected, even in production, for diagnostic purposes.
|
|
72
|
+
*/
|
|
73
|
+
readonly essential: 30;
|
|
74
|
+
/**
|
|
75
|
+
* Default LogLevel
|
|
76
|
+
* @deprecated Prefer {@link LogLevelConst.info | LogLevel.info} when selecting a level explicitly to preserve prior treatment. Planned to be removed in 3.0.0.
|
|
77
|
+
* @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.
|
|
78
|
+
*/
|
|
54
79
|
readonly default: 20;
|
|
80
|
+
/**
|
|
81
|
+
* To log errors.
|
|
82
|
+
* @deprecated Prefer {@link LogLevelConst.essential | LogLevel.essential} when selecting a level. Planned to be removed in 3.0.0.
|
|
83
|
+
* @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.
|
|
84
|
+
*/
|
|
55
85
|
readonly error: 30;
|
|
56
|
-
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Provides runtime {@link (LogLevel:type)} values via symbolic names
|
|
89
|
+
* @see {@link LogLevelConst} type.
|
|
90
|
+
* @public
|
|
91
|
+
*/
|
|
92
|
+
export declare const LogLevel: LogLevelConst;
|
|
57
93
|
/**
|
|
58
94
|
* Specify a level to the log to filter out logs based on the level.
|
|
59
95
|
* @public
|
|
@@ -68,12 +104,12 @@ export interface ITelemetryBaseLogger {
|
|
|
68
104
|
/**
|
|
69
105
|
* Log a telemetry event, if it meets the appropriate log-level threshold (see {@link ITelemetryBaseLogger.minLogLevel}).
|
|
70
106
|
* @param event - The event to log.
|
|
71
|
-
* @param logLevel - The log level of the event.
|
|
107
|
+
* @param logLevel - The log level of the event. If undefined, the logLevel should be treated as {@link LogLevelConst.essential | LogLevel.essential}.
|
|
72
108
|
*/
|
|
73
109
|
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
|
|
74
110
|
/**
|
|
75
111
|
* Minimum log level to be logged.
|
|
76
|
-
* @defaultValue {@link
|
|
112
|
+
* @defaultValue {@link LogLevelConst.info | LogLevel.info}.
|
|
77
113
|
*/
|
|
78
114
|
minLogLevel?: LogLevel;
|
|
79
115
|
}
|
package/dist/logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],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C,OAAO,EAAE,EAAE,CAAC;IAErB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC;IAEvB;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC;IAErB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;CACnB;AAED;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,aAMtB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AAEhE;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACpC;;;;OAIG;IACH,IAAI,CAAC,KAAK,EAAE,mBAAmB,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAE5D;;;OAGG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAqB,SAAQ,wBAAwB;IACrE,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC3C;;OAEG;IACH,sBAAsB,IAAI,wBAAwB,CAAC;CACnD"}
|
package/dist/logger.js
CHANGED
|
@@ -6,12 +6,15 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.LogLevel = void 0;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Provides runtime {@link (LogLevel:type)} values via symbolic names
|
|
10
|
+
* @see {@link LogLevelConst} type.
|
|
10
11
|
* @public
|
|
11
12
|
*/
|
|
12
13
|
exports.LogLevel = {
|
|
13
|
-
verbose: 10,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
verbose: 10,
|
|
15
|
+
info: 20,
|
|
16
|
+
essential: 30,
|
|
17
|
+
default: 20,
|
|
18
|
+
error: 30,
|
|
16
19
|
};
|
|
17
20
|
//# sourceMappingURL=logger.js.map
|
package/dist/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA6FH;;;;GAIG;AACU,QAAA,QAAQ,GAAkB;IACtC,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,EAAE;IACR,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE;CACT,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Property types that can be logged.\n *\n * @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can\n * easily add fields to objects that shouldn't be logged and not realize it's going to be logged.\n * General best practice is to explicitly log the fields you care about from objects.\n * @public\n */\nexport type TelemetryBaseEventPropertyType = string | number | boolean | undefined;\n\n/**\n * A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.\n * This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).\n *\n * This indicates that the value should be organized or handled differently by loggers in various first or third\n * party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.\n * @public\n */\nexport interface Tagged<V, T extends string = string> {\n\tvalue: V;\n\ttag: T;\n}\n\n/**\n * JSON-serializable properties, which will be logged with telemetry.\n * @public\n */\nexport interface ITelemetryBaseProperties {\n\t/**\n\t * Properties of a telemetry event. They are string-indexed, and their values restricted to a known set of\n\t * types (optionally \"wrapped\" with {@link Tagged}).\n\t */\n\t[index: string]: TelemetryBaseEventPropertyType | Tagged<TelemetryBaseEventPropertyType>;\n}\n\n/**\n * Base interface for logging telemetry statements.\n * Can contain any number of properties that get serialized as json payload.\n * @param category - category of the event, like \"error\", \"performance\", \"generic\", etc.\n * @param eventName - name of the event.\n * @public\n */\nexport interface ITelemetryBaseEvent extends ITelemetryBaseProperties {\n\tcategory: string;\n\teventName: string;\n}\n\n/**\n * Specify levels of the logs.\n *\n * @privateRemarks This interface exists solely for documentation. API Extractor does not\n * propagate TSDoc comments from a const's inline type to API reports, so we define the shape\n * here and use LogLevelConst on the LogLevel const to surface member docs.\n *\n * @public\n */\nexport interface LogLevelConst {\n\t/**\n\t * Chatty logs useful for debugging.\n\t * @remarks They need not be collected in production.\n\t */\n\treadonly verbose: 10;\n\n\t/**\n\t * Information about the session.\n\t * @remarks These logs could be omitted in some sessions if needed (e.g. to reduce overall telemetry volume).\n\t * If any are collected from a particular session, all should be.\n\t */\n\treadonly info: 20;\n\n\t/**\n\t * Essential information about the operation of Fluid.\n\t * @remarks It is recommended that these should always be collected, even in production, for diagnostic purposes.\n\t */\n\treadonly essential: 30;\n\n\t/**\n\t * Default LogLevel\n\t * @deprecated Prefer {@link LogLevelConst.info | LogLevel.info} when selecting a level explicitly to preserve prior treatment. Planned to be removed in 3.0.0.\n\t * @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.\n\t */\n\treadonly default: 20;\n\n\t/**\n\t * To log errors.\n\t * @deprecated Prefer {@link LogLevelConst.essential | LogLevel.essential} when selecting a level. Planned to be removed in 3.0.0.\n\t * @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.\n\t */\n\treadonly error: 30;\n}\n\n/**\n * Provides runtime {@link (LogLevel:type)} values via symbolic names\n * @see {@link LogLevelConst} type.\n * @public\n */\nexport const LogLevel: LogLevelConst = {\n\tverbose: 10,\n\tinfo: 20,\n\tessential: 30,\n\tdefault: 20,\n\terror: 30,\n};\n\n/**\n * Specify a level to the log to filter out logs based on the level.\n * @public\n */\nexport type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];\n\n/**\n * Interface to output telemetry events.\n * Implemented by hosting app / loader\n * @public\n */\nexport interface ITelemetryBaseLogger {\n\t/**\n\t * Log a telemetry event, if it meets the appropriate log-level threshold (see {@link ITelemetryBaseLogger.minLogLevel}).\n\t * @param event - The event to log.\n\t * @param logLevel - The log level of the event. If undefined, the logLevel should be treated as {@link LogLevelConst.essential | LogLevel.essential}.\n\t */\n\tsend(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;\n\n\t/**\n\t * Minimum log level to be logged.\n\t * @defaultValue {@link LogLevelConst.info | LogLevel.info}.\n\t */\n\tminLogLevel?: LogLevel;\n}\n\n/**\n * Error telemetry event.\n * Maps to category = \"error\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n * @public\n */\nexport interface ITelemetryErrorEvent extends ITelemetryBaseProperties {\n\teventName: string;\n}\n\n/**\n * An error object that supports exporting its properties to be logged to telemetry\n * @legacy @beta\n */\nexport interface ILoggingError extends Error {\n\t/**\n\t * Return all properties from this object that should be logged to telemetry\n\t */\n\tgetTelemetryProperties(): ITelemetryBaseProperties;\n}\n"]}
|
package/dist/public.d.ts
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { IFluidLoadable } from "./fluidLoadable.js";
|
|
|
13
13
|
export type { IRequest, IRequestHeader, IResponse } from "./fluidRouter.js";
|
|
14
14
|
export type { IFluidHandleErased, IFluidHandleEvents, IFluidHandleInternal, IFluidHandleInternalPayloadPending, IFluidHandlePayloadPending, ILocalFluidHandle, ILocalFluidHandleEvents, IProvideFluidHandle, IProvideFluidHandleContext, PayloadState, } from "./handles.js";
|
|
15
15
|
export { IFluidHandleContext, IFluidHandle, fluidHandleSymbol } from "./handles.js";
|
|
16
|
-
export type { ILoggingError, ITelemetryBaseEvent, ITelemetryBaseLogger, ITelemetryBaseProperties, Tagged, TelemetryBaseEventPropertyType, } from "./logger.js";
|
|
16
|
+
export type { ILoggingError, ITelemetryBaseEvent, ITelemetryBaseLogger, ITelemetryBaseProperties, LogLevelConst, Tagged, TelemetryBaseEventPropertyType, } from "./logger.js";
|
|
17
17
|
export { LogLevel } from "./logger.js";
|
|
18
18
|
export type { FluidObjectProviderKeys, FluidObject, FluidObjectKeys } from "./provider.js";
|
|
19
19
|
export type { ConfigTypes, IConfigProviderBase } from "./config.js";
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,YAAY,EACX,aAAa,EACb,qBAAqB,EACrB,QAAQ,EACR,gBAAgB,GAChB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACX,UAAU,EACV,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,0BAA0B,GAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,eAAe,EACf,oBAAoB,GACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACX,mBAAmB,EACnB,WAAW,EACX,MAAM,EACN,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,4BAA4B,EAC5B,gBAAgB,GAChB,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKpD,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE5E,YAAY,EACX,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,kCAAkC,EAClC,0BAA0B,EAC1B,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,0BAA0B,EAC1B,YAAY,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,mBAAmB,EAAE,YAAY,E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AAe,EACf,oBAAoB,GACpB,MAAM,YAAY,CAAC;AAcpB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAmBpD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoBH,OAAO,EACN,eAAe,EACf,oBAAoB,GACpB,MAAM,YAAY,CAAC;AAcpB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAmBpD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAWpF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAKvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type { BrandedType } from \"./brandedType.js\";\n\nexport type { IDisposable } from \"./disposable.js\";\n\nexport type {\n\tFluidIterable,\n\tFluidIterableIterator,\n\tFluidMap,\n\tFluidReadonlyMap,\n} from \"./fluidMap.js\";\n\nexport type {\n\tIErrorBase,\n\tIGenericError,\n\tIUsageError,\n\tIThrottlingWarning,\n\tILayerIncompatibilityError,\n} from \"./error.js\";\nexport {\n\tFluidErrorTypes,\n\tFluidErrorTypesAlpha,\n} from \"./error.js\";\n\nexport type {\n\tExtendEventProvider,\n\tIErrorEvent,\n\tIEvent,\n\tIEventProvider,\n\tIEventThisPlaceHolder,\n\tIEventTransformer,\n\tReplaceIEventThisPlaceHolder,\n\tTransformedEvent,\n} from \"./events.js\";\n\nexport type { IProvideFluidLoadable } from \"./fluidLoadable.js\";\nexport { IFluidLoadable } from \"./fluidLoadable.js\";\n\n// TypeScript forgets the index signature when customers augment IRequestHeader if we export *.\n// So we export the explicit members as a workaround:\n// https://github.com/microsoft/TypeScript/issues/18877#issuecomment-476921038\nexport type { IRequest, IRequestHeader, IResponse } from \"./fluidRouter.js\";\n\nexport type {\n\tIFluidHandleErased,\n\tIFluidHandleEvents,\n\tIFluidHandleInternal,\n\tIFluidHandleInternalPayloadPending,\n\tIFluidHandlePayloadPending,\n\tILocalFluidHandle,\n\tILocalFluidHandleEvents,\n\tIProvideFluidHandle,\n\tIProvideFluidHandleContext,\n\tPayloadState,\n} from \"./handles.js\";\nexport { IFluidHandleContext, IFluidHandle, fluidHandleSymbol } from \"./handles.js\";\n\nexport type {\n\tILoggingError,\n\tITelemetryBaseEvent,\n\tITelemetryBaseLogger,\n\tITelemetryBaseProperties,\n\tLogLevelConst,\n\tTagged,\n\tTelemetryBaseEventPropertyType,\n} from \"./logger.js\";\nexport { LogLevel } from \"./logger.js\";\nexport type { FluidObjectProviderKeys, FluidObject, FluidObjectKeys } from \"./provider.js\";\nexport type { ConfigTypes, IConfigProviderBase } from \"./config.js\";\nexport type { ISignalEnvelope, TypedMessage } from \"./messages.js\";\nexport type { ErasedType, ErasedBaseType, InstanceTypeRelaxed } from \"./erasedType.js\";\nexport { ErasedTypeImplementation } from \"./erasedType.js\";\n\nexport type {\n\tHasListeners,\n\tIEmitter,\n\tIsListener,\n\tListeners,\n\tListenable,\n\tMapGetSet,\n\tNoListenersCallback,\n\tOff,\n} from \"./events/index.js\";\n"]}
|
package/lib/legacy.alpha.d.ts
CHANGED
package/lib/legacy.d.ts
CHANGED
package/lib/logger.d.ts
CHANGED
|
@@ -47,13 +47,49 @@ export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
|
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Specify levels of the logs.
|
|
50
|
+
*
|
|
51
|
+
* @privateRemarks This interface exists solely for documentation. API Extractor does not
|
|
52
|
+
* propagate TSDoc comments from a const's inline type to API reports, so we define the shape
|
|
53
|
+
* here and use LogLevelConst on the LogLevel const to surface member docs.
|
|
54
|
+
*
|
|
50
55
|
* @public
|
|
51
56
|
*/
|
|
52
|
-
export
|
|
57
|
+
export interface LogLevelConst {
|
|
58
|
+
/**
|
|
59
|
+
* Chatty logs useful for debugging.
|
|
60
|
+
* @remarks They need not be collected in production.
|
|
61
|
+
*/
|
|
53
62
|
readonly verbose: 10;
|
|
63
|
+
/**
|
|
64
|
+
* Information about the session.
|
|
65
|
+
* @remarks These logs could be omitted in some sessions if needed (e.g. to reduce overall telemetry volume).
|
|
66
|
+
* If any are collected from a particular session, all should be.
|
|
67
|
+
*/
|
|
68
|
+
readonly info: 20;
|
|
69
|
+
/**
|
|
70
|
+
* Essential information about the operation of Fluid.
|
|
71
|
+
* @remarks It is recommended that these should always be collected, even in production, for diagnostic purposes.
|
|
72
|
+
*/
|
|
73
|
+
readonly essential: 30;
|
|
74
|
+
/**
|
|
75
|
+
* Default LogLevel
|
|
76
|
+
* @deprecated Prefer {@link LogLevelConst.info | LogLevel.info} when selecting a level explicitly to preserve prior treatment. Planned to be removed in 3.0.0.
|
|
77
|
+
* @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.
|
|
78
|
+
*/
|
|
54
79
|
readonly default: 20;
|
|
80
|
+
/**
|
|
81
|
+
* To log errors.
|
|
82
|
+
* @deprecated Prefer {@link LogLevelConst.essential | LogLevel.essential} when selecting a level. Planned to be removed in 3.0.0.
|
|
83
|
+
* @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.
|
|
84
|
+
*/
|
|
55
85
|
readonly error: 30;
|
|
56
|
-
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Provides runtime {@link (LogLevel:type)} values via symbolic names
|
|
89
|
+
* @see {@link LogLevelConst} type.
|
|
90
|
+
* @public
|
|
91
|
+
*/
|
|
92
|
+
export declare const LogLevel: LogLevelConst;
|
|
57
93
|
/**
|
|
58
94
|
* Specify a level to the log to filter out logs based on the level.
|
|
59
95
|
* @public
|
|
@@ -68,12 +104,12 @@ export interface ITelemetryBaseLogger {
|
|
|
68
104
|
/**
|
|
69
105
|
* Log a telemetry event, if it meets the appropriate log-level threshold (see {@link ITelemetryBaseLogger.minLogLevel}).
|
|
70
106
|
* @param event - The event to log.
|
|
71
|
-
* @param logLevel - The log level of the event.
|
|
107
|
+
* @param logLevel - The log level of the event. If undefined, the logLevel should be treated as {@link LogLevelConst.essential | LogLevel.essential}.
|
|
72
108
|
*/
|
|
73
109
|
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
|
|
74
110
|
/**
|
|
75
111
|
* Minimum log level to be logged.
|
|
76
|
-
* @defaultValue {@link
|
|
112
|
+
* @defaultValue {@link LogLevelConst.info | LogLevel.info}.
|
|
77
113
|
*/
|
|
78
114
|
minLogLevel?: LogLevel;
|
|
79
115
|
}
|
package/lib/logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,8BAA8B,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEnF;;;;;;;GAOG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM;IACnD,KAAK,EAAE,CAAC,CAAC;IACT,GAAG,EAAE,CAAC,CAAC;CACP;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACxC;;;OAGG;IACH,CAAC,KAAK,EAAE,MAAM,GAAG,8BAA8B,GAAG,MAAM,CAAC,8BAA8B,CAAC,CAAC;CACzF;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB;IACpE,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;;
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"A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CACvB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAqB,SAAQ,wBAAwB;IACrE,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC3C;;OAEG;IACH,sBAAsB,IAAI,wBAAwB,CAAC;CACnD"}
|
package/lib/logger.js
CHANGED
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Provides runtime {@link (LogLevel:type)} values via symbolic names
|
|
7
|
+
* @see {@link LogLevelConst} type.
|
|
7
8
|
* @public
|
|
8
9
|
*/
|
|
9
10
|
export const LogLevel = {
|
|
10
|
-
verbose: 10,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
verbose: 10,
|
|
12
|
+
info: 20,
|
|
13
|
+
essential: 30,
|
|
14
|
+
default: 20,
|
|
15
|
+
error: 30,
|
|
13
16
|
};
|
|
14
17
|
//# sourceMappingURL=logger.js.map
|
package/lib/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6FH;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAkB;IACtC,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,EAAE;IACR,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE;CACT,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Property types that can be logged.\n *\n * @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can\n * easily add fields to objects that shouldn't be logged and not realize it's going to be logged.\n * General best practice is to explicitly log the fields you care about from objects.\n * @public\n */\nexport type TelemetryBaseEventPropertyType = string | number | boolean | undefined;\n\n/**\n * A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.\n * This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).\n *\n * This indicates that the value should be organized or handled differently by loggers in various first or third\n * party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.\n * @public\n */\nexport interface Tagged<V, T extends string = string> {\n\tvalue: V;\n\ttag: T;\n}\n\n/**\n * JSON-serializable properties, which will be logged with telemetry.\n * @public\n */\nexport interface ITelemetryBaseProperties {\n\t/**\n\t * Properties of a telemetry event. They are string-indexed, and their values restricted to a known set of\n\t * types (optionally \"wrapped\" with {@link Tagged}).\n\t */\n\t[index: string]: TelemetryBaseEventPropertyType | Tagged<TelemetryBaseEventPropertyType>;\n}\n\n/**\n * Base interface for logging telemetry statements.\n * Can contain any number of properties that get serialized as json payload.\n * @param category - category of the event, like \"error\", \"performance\", \"generic\", etc.\n * @param eventName - name of the event.\n * @public\n */\nexport interface ITelemetryBaseEvent extends ITelemetryBaseProperties {\n\tcategory: string;\n\teventName: string;\n}\n\n/**\n * Specify levels of the logs.\n *\n * @privateRemarks This interface exists solely for documentation. API Extractor does not\n * propagate TSDoc comments from a const's inline type to API reports, so we define the shape\n * here and use LogLevelConst on the LogLevel const to surface member docs.\n *\n * @public\n */\nexport interface LogLevelConst {\n\t/**\n\t * Chatty logs useful for debugging.\n\t * @remarks They need not be collected in production.\n\t */\n\treadonly verbose: 10;\n\n\t/**\n\t * Information about the session.\n\t * @remarks These logs could be omitted in some sessions if needed (e.g. to reduce overall telemetry volume).\n\t * If any are collected from a particular session, all should be.\n\t */\n\treadonly info: 20;\n\n\t/**\n\t * Essential information about the operation of Fluid.\n\t * @remarks It is recommended that these should always be collected, even in production, for diagnostic purposes.\n\t */\n\treadonly essential: 30;\n\n\t/**\n\t * Default LogLevel\n\t * @deprecated Prefer {@link LogLevelConst.info | LogLevel.info} when selecting a level explicitly to preserve prior treatment. Planned to be removed in 3.0.0.\n\t * @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.\n\t */\n\treadonly default: 20;\n\n\t/**\n\t * To log errors.\n\t * @deprecated Prefer {@link LogLevelConst.essential | LogLevel.essential} when selecting a level. Planned to be removed in 3.0.0.\n\t * @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.\n\t */\n\treadonly error: 30;\n}\n\n/**\n * Provides runtime {@link (LogLevel:type)} values via symbolic names\n * @see {@link LogLevelConst} type.\n * @public\n */\nexport const LogLevel: LogLevelConst = {\n\tverbose: 10,\n\tinfo: 20,\n\tessential: 30,\n\tdefault: 20,\n\terror: 30,\n};\n\n/**\n * Specify a level to the log to filter out logs based on the level.\n * @public\n */\nexport type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];\n\n/**\n * Interface to output telemetry events.\n * Implemented by hosting app / loader\n * @public\n */\nexport interface ITelemetryBaseLogger {\n\t/**\n\t * Log a telemetry event, if it meets the appropriate log-level threshold (see {@link ITelemetryBaseLogger.minLogLevel}).\n\t * @param event - The event to log.\n\t * @param logLevel - The log level of the event. If undefined, the logLevel should be treated as {@link LogLevelConst.essential | LogLevel.essential}.\n\t */\n\tsend(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;\n\n\t/**\n\t * Minimum log level to be logged.\n\t * @defaultValue {@link LogLevelConst.info | LogLevel.info}.\n\t */\n\tminLogLevel?: LogLevel;\n}\n\n/**\n * Error telemetry event.\n * Maps to category = \"error\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n * @public\n */\nexport interface ITelemetryErrorEvent extends ITelemetryBaseProperties {\n\teventName: string;\n}\n\n/**\n * An error object that supports exporting its properties to be logged to telemetry\n * @legacy @beta\n */\nexport interface ILoggingError extends Error {\n\t/**\n\t * Return all properties from this object that should be logged to telemetry\n\t */\n\tgetTelemetryProperties(): ITelemetryBaseProperties;\n}\n"]}
|
package/lib/public.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/core-interfaces",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.101.0",
|
|
4
4
|
"description": "Fluid object interfaces",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
85
85
|
"@biomejs/biome": "~2.4.5",
|
|
86
|
-
"@fluid-tools/build-cli": "^0.
|
|
86
|
+
"@fluid-tools/build-cli": "^0.65.0",
|
|
87
87
|
"@fluidframework/build-common": "^2.0.3",
|
|
88
|
-
"@fluidframework/build-tools": "^0.
|
|
88
|
+
"@fluidframework/build-tools": "^0.65.0",
|
|
89
89
|
"@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@2.92.0",
|
|
90
90
|
"@fluidframework/eslint-config-fluid": "^9.0.0",
|
|
91
91
|
"@microsoft/api-extractor": "7.58.1",
|
package/src/index.ts
CHANGED
package/src/logger.ts
CHANGED
|
@@ -52,13 +52,60 @@ export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
|
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Specify levels of the logs.
|
|
55
|
+
*
|
|
56
|
+
* @privateRemarks This interface exists solely for documentation. API Extractor does not
|
|
57
|
+
* propagate TSDoc comments from a const's inline type to API reports, so we define the shape
|
|
58
|
+
* here and use LogLevelConst on the LogLevel const to surface member docs.
|
|
59
|
+
*
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
export interface LogLevelConst {
|
|
63
|
+
/**
|
|
64
|
+
* Chatty logs useful for debugging.
|
|
65
|
+
* @remarks They need not be collected in production.
|
|
66
|
+
*/
|
|
67
|
+
readonly verbose: 10;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Information about the session.
|
|
71
|
+
* @remarks These logs could be omitted in some sessions if needed (e.g. to reduce overall telemetry volume).
|
|
72
|
+
* If any are collected from a particular session, all should be.
|
|
73
|
+
*/
|
|
74
|
+
readonly info: 20;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Essential information about the operation of Fluid.
|
|
78
|
+
* @remarks It is recommended that these should always be collected, even in production, for diagnostic purposes.
|
|
79
|
+
*/
|
|
80
|
+
readonly essential: 30;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Default LogLevel
|
|
84
|
+
* @deprecated Prefer {@link LogLevelConst.info | LogLevel.info} when selecting a level explicitly to preserve prior treatment. Planned to be removed in 3.0.0.
|
|
85
|
+
* @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.
|
|
86
|
+
*/
|
|
87
|
+
readonly default: 20;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* To log errors.
|
|
91
|
+
* @deprecated Prefer {@link LogLevelConst.essential | LogLevel.essential} when selecting a level. Planned to be removed in 3.0.0.
|
|
92
|
+
* @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.
|
|
93
|
+
*/
|
|
94
|
+
readonly error: 30;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Provides runtime {@link (LogLevel:type)} values via symbolic names
|
|
99
|
+
* @see {@link LogLevelConst} type.
|
|
55
100
|
* @public
|
|
56
101
|
*/
|
|
57
|
-
export const LogLevel = {
|
|
58
|
-
verbose: 10,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
102
|
+
export const LogLevel: LogLevelConst = {
|
|
103
|
+
verbose: 10,
|
|
104
|
+
info: 20,
|
|
105
|
+
essential: 30,
|
|
106
|
+
default: 20,
|
|
107
|
+
error: 30,
|
|
108
|
+
};
|
|
62
109
|
|
|
63
110
|
/**
|
|
64
111
|
* Specify a level to the log to filter out logs based on the level.
|
|
@@ -75,13 +122,13 @@ export interface ITelemetryBaseLogger {
|
|
|
75
122
|
/**
|
|
76
123
|
* Log a telemetry event, if it meets the appropriate log-level threshold (see {@link ITelemetryBaseLogger.minLogLevel}).
|
|
77
124
|
* @param event - The event to log.
|
|
78
|
-
* @param logLevel - The log level of the event.
|
|
125
|
+
* @param logLevel - The log level of the event. If undefined, the logLevel should be treated as {@link LogLevelConst.essential | LogLevel.essential}.
|
|
79
126
|
*/
|
|
80
127
|
send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
|
|
81
128
|
|
|
82
129
|
/**
|
|
83
130
|
* Minimum log level to be logged.
|
|
84
|
-
* @defaultValue {@link
|
|
131
|
+
* @defaultValue {@link LogLevelConst.info | LogLevel.info}.
|
|
85
132
|
*/
|
|
86
133
|
minLogLevel?: LogLevel;
|
|
87
134
|
}
|