Latest Supply Chain Attack:Mini Shai-Hulud Hits @antv npm Packages, 639 Versions Compromised.Learn More
Socket
Book a DemoSign in
Socket

@fluidframework/core-interfaces

Package Overview
Dependencies
Maintainers
1
Versions
544
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluidframework/core-interfaces - npm Package Compare versions

Comparing version
2.100.0
to
2.101.0
+2
-0
api-report/core-interfaces.beta.api.md

@@ -336,3 +336,5 @@ ## Beta API Report File for "@fluidframework/core-interfaces"

export interface LogLevelConst {
// @deprecated
readonly default: 20;
// @deprecated
readonly error: 30;

@@ -339,0 +341,0 @@ readonly essential: 30;

@@ -481,3 +481,5 @@ ## Alpha API Report File for "@fluidframework/core-interfaces"

export interface LogLevelConst {
// @deprecated
readonly default: 20;
// @deprecated
readonly error: 30;

@@ -484,0 +486,0 @@ readonly essential: 30;

@@ -468,3 +468,5 @@ ## Beta API Report File for "@fluidframework/core-interfaces"

export interface LogLevelConst {
// @deprecated
readonly default: 20;
// @deprecated
readonly error: 30;

@@ -471,0 +473,0 @@ readonly essential: 30;

@@ -336,3 +336,5 @@ ## Public API Report File for "@fluidframework/core-interfaces"

export interface LogLevelConst {
// @deprecated
readonly default: 20;
// @deprecated
readonly error: 30;

@@ -339,0 +341,0 @@ readonly essential: 30;

@@ -336,3 +336,5 @@ ## Public API Report File for "@fluidframework/core-interfaces"

export interface LogLevelConst {
// @deprecated
readonly default: 20;
// @deprecated
readonly error: 30;

@@ -339,0 +341,0 @@ readonly essential: 30;

# @fluidframework/core-interfaces
## 2.101.0
### Minor Changes
- Deprecate LogLevel.default and LogLevel.error ([#27207](https://github.com/microsoft/FluidFramework/pull/27207)) [77ef3355fdf](https://github.com/microsoft/FluidFramework/commit/77ef3355fdf9611524cad86f00b1ce8ba3263861)
`LogLevel.default` and `LogLevel.error` in `@fluidframework/core-interfaces` are deprecated in favor of the semantically clearer `LogLevel.info` and `LogLevel.essential`.
#### Migration
The recommended replacement for `LogLevel.default` depends on how the value is used:
- For an **event's default `logLevel`** (e.g. the `logLevel` argument to `ITelemetryBaseLogger.send`), the recommendation is `LogLevel.essential`.
- For a logger's **default `minLogLevel`** (the threshold that filters events), `LogLevel.info` is the recommendation.
The replacement for `LogLevel.error` should always be `LogLevel.essential`.
See [issue #26969](https://github.com/microsoft/FluidFramework/issues/26969) for full guidance and removal tracking (planned for v3.0).
## 2.100.0

@@ -4,0 +22,0 @@

+6
-4

@@ -76,3 +76,4 @@ /*!

* Default LogLevel
* @remarks Prefer {@link LogLevelConst.info | LogLevel.info} when selecting a level explicitly since this will be deprecated and removed in a future release.
* @deprecated Prefer {@link LogLevelConst.info | LogLevel.info} when selecting a level explicitly to preserve prior treatment. Planned to be removed in 3.0.0.
* @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.
*/

@@ -82,3 +83,4 @@ readonly default: 20;

* To log errors.
* @remarks Prefer {@link LogLevelConst.essential | LogLevel.essential} when selecting a level since this will be deprecated and removed in a future release.
* @deprecated Prefer {@link LogLevelConst.essential | LogLevel.essential} when selecting a level. Planned to be removed in 3.0.0.
* @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.
*/

@@ -107,3 +109,3 @@ readonly error: 30;

* @param event - The event to log.
* @param logLevel - The log level of the event. Default: {@link LogLevelConst.default | LogLevel.default}.
* @param logLevel - The log level of the event. If undefined, the logLevel should be treated as {@link LogLevelConst.essential | LogLevel.essential}.
*/

@@ -113,3 +115,3 @@ send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;

* Minimum log level to be logged.
* @defaultValue {@link LogLevelConst.default | LogLevel.default}.
* @defaultValue {@link LogLevelConst.info | LogLevel.info}.
*/

@@ -116,0 +118,0 @@ minLogLevel?: LogLevel;

@@ -1,1 +0,1 @@

{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AACH,MAAM,MAA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AAO,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"}

@@ -1,1 +0,1 @@

{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA2FH;;;;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 * @remarks Prefer {@link LogLevelConst.info | LogLevel.info} when selecting a level explicitly since this will be deprecated and removed in a future release.\n\t */\n\treadonly default: 20;\n\n\t/**\n\t * To log errors.\n\t * @remarks Prefer {@link LogLevelConst.essential | LogLevel.essential} when selecting a level since this will be deprecated and removed in a future release.\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. Default: {@link LogLevelConst.default | LogLevel.default}.\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.default | LogLevel.default}.\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"]}
{"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"]}

@@ -76,3 +76,4 @@ /*!

* Default LogLevel
* @remarks Prefer {@link LogLevelConst.info | LogLevel.info} when selecting a level explicitly since this will be deprecated and removed in a future release.
* @deprecated Prefer {@link LogLevelConst.info | LogLevel.info} when selecting a level explicitly to preserve prior treatment. Planned to be removed in 3.0.0.
* @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.
*/

@@ -82,3 +83,4 @@ readonly default: 20;

* To log errors.
* @remarks Prefer {@link LogLevelConst.essential | LogLevel.essential} when selecting a level since this will be deprecated and removed in a future release.
* @deprecated Prefer {@link LogLevelConst.essential | LogLevel.essential} when selecting a level. Planned to be removed in 3.0.0.
* @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.
*/

@@ -107,3 +109,3 @@ readonly error: 30;

* @param event - The event to log.
* @param logLevel - The log level of the event. Default: {@link LogLevelConst.default | LogLevel.default}.
* @param logLevel - The log level of the event. If undefined, the logLevel should be treated as {@link LogLevelConst.essential | LogLevel.essential}.
*/

@@ -113,3 +115,3 @@ send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;

* Minimum log level to be logged.
* @defaultValue {@link LogLevelConst.default | LogLevel.default}.
* @defaultValue {@link LogLevelConst.info | LogLevel.info}.
*/

@@ -116,0 +118,0 @@ minLogLevel?: LogLevel;

@@ -1,1 +0,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;;;OAG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SAAQ,wBAAwB;IACrE,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC3C;;OAEG;IACH,sBAAsB,IAAI,wBAAwB,CAAC;CACnD"}

@@ -1,1 +0,1 @@

{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2FH;;;;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 * @remarks Prefer {@link LogLevelConst.info | LogLevel.info} when selecting a level explicitly since this will be deprecated and removed in a future release.\n\t */\n\treadonly default: 20;\n\n\t/**\n\t * To log errors.\n\t * @remarks Prefer {@link LogLevelConst.essential | LogLevel.essential} when selecting a level since this will be deprecated and removed in a future release.\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. Default: {@link LogLevelConst.default | LogLevel.default}.\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.default | LogLevel.default}.\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"]}
{"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"]}
{
"name": "@fluidframework/core-interfaces",
"version": "2.100.0",
"version": "2.101.0",
"description": "Fluid object interfaces",

@@ -5,0 +5,0 @@ "homepage": "https://fluidframework.com",

@@ -84,3 +84,4 @@ /*!

* Default LogLevel
* @remarks Prefer {@link LogLevelConst.info | LogLevel.info} when selecting a level explicitly since this will be deprecated and removed in a future release.
* @deprecated Prefer {@link LogLevelConst.info | LogLevel.info} when selecting a level explicitly to preserve prior treatment. Planned to be removed in 3.0.0.
* @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.
*/

@@ -91,3 +92,4 @@ readonly default: 20;

* To log errors.
* @remarks Prefer {@link LogLevelConst.essential | LogLevel.essential} when selecting a level since this will be deprecated and removed in a future release.
* @deprecated Prefer {@link LogLevelConst.essential | LogLevel.essential} when selecting a level. Planned to be removed in 3.0.0.
* @see {@link https://github.com/microsoft/FluidFramework/issues/26969 | Issue #26969} for removal tracking.
*/

@@ -125,3 +127,3 @@ readonly error: 30;

* @param event - The event to log.
* @param logLevel - The log level of the event. Default: {@link LogLevelConst.default | LogLevel.default}.
* @param logLevel - The log level of the event. If undefined, the logLevel should be treated as {@link LogLevelConst.essential | LogLevel.essential}.
*/

@@ -132,3 +134,3 @@ send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;

* Minimum log level to be logged.
* @defaultValue {@link LogLevelConst.default | LogLevel.default}.
* @defaultValue {@link LogLevelConst.info | LogLevel.info}.
*/

@@ -135,0 +137,0 @@ minLogLevel?: LogLevel;