Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: explain incompatibilities with proxy objects #496

Merged
merged 1 commit into from
Apr 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/logger/docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Emoji | Label | Meaning
* [Log level changes](#n-logger-log-level-changes)
* [Logger method changes](#n-logger-method-changes)
* [Environment variable changes](#n-logger-environment-variable-changes)
* [Proxy incompatibility](#n-logger-proxy-incompatibility)
* [Migrating from n-mask-logger](#migrating-from-n-mask-logger)
* [API changes](#n-mask-logger-api-changes)
* [where logs get sent](#n-mask-logger-where-logs-get-sent)
Expand Down Expand Up @@ -133,6 +134,12 @@ The following environment variables have been deprecated.

* **`SPLUNK_LOG_LEVEL`:** This environment variable will be used if a `LOG_LEVEL` environment variable is not present, however it may be removed in a later version of the Reliability Kit logger. It's best to migrate to `LOG_LEVEL` early.

### n-logger: proxy incompatibility

**:red_circle: Breaking:** due to our use of [private class features](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields) in the new logger, using [Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) objects is no longer possible. This is a known JavaScript incompatibility between private fields and proxies.

We decided to continue using private fields because `Proxy` use at the FT is uncommon and private fields allow us to ensure internal APIs aren't used in places that they shouldn't be.


## Migrating from n-mask-logger

Expand Down