summaryrefslogtreecommitdiff
path: root/frontend-old/node_modules/@firebase/logger/README.md
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2025-11-09 11:15:19 +0800
committeraltaf-creator <dev@altafcreator.com>2025-11-09 11:15:19 +0800
commit8eff962cab608341a6f2fedc640a0e32d96f26e2 (patch)
tree05534d1a720ddc3691d346c69b4972555820a061 /frontend-old/node_modules/@firebase/logger/README.md
pain
Diffstat (limited to 'frontend-old/node_modules/@firebase/logger/README.md')
-rw-r--r--frontend-old/node_modules/@firebase/logger/README.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@firebase/logger/README.md b/frontend-old/node_modules/@firebase/logger/README.md
new file mode 100644
index 0000000..69c1642
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/logger/README.md
@@ -0,0 +1,40 @@
+# @firebase/logger
+
+This package serves as the base of all logging in the JS SDK. Any logging that
+is intended to be visible to Firebase end developers should go through this
+module.
+
+## Basic Usage
+
+Firebase components should import the `Logger` class and instantiate a new
+instance by passing a component name (e.g. `@firebase/<COMPONENT>`) to the
+constructor.
+
+_e.g._
+
+```typescript
+import { Logger } from '@firebase/logger';
+
+const logClient = new Logger(`@firebase/<COMPONENT>`);
+```
+
+Each `Logger` instance supports 5 log functions each to be used in a specific
+instance:
+
+- `debug`: Internal logs; use this to allow developers to send us their debug
+ logs for us to be able to diagnose an issue.
+- `log`: Use to inform your user about things they may need to know.
+- `info`: Use if you have to inform the user about something that they need to
+ take a concrete action on. Once they take that action, the log should go away.
+- `warn`: Use when a product feature may stop functioning correctly; unexpected
+ scenario.
+- `error`: Only use when user App would stop functioning correctly - super rare!
+
+## Log Format
+
+Each log will be formatted in the following manner:
+
+```typescript
+`[${new Date()}] ${COMPONENT_NAME}: ${...args}`
+```
+