@logickernel/logger 0.2.1 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +4 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -32,7 +32,7 @@ logger.warning("disk space low", { used: "92%", mount: "/data" });
32
32
 
33
33
  ---
34
34
 
35
- ## 2. Installation & Usage (as a Library)
35
+ ## 2. Installation & Usage
36
36
 
37
37
  ### Install from npm
38
38
 
@@ -60,9 +60,7 @@ logger.critical("primary db unreachable", { host: "db-1", retries: 3 });
60
60
 
61
61
  The default export is a **singleton** whose backend is chosen at module load:
62
62
 
63
- - **GCP backend** is used when:
64
- - `SYSTEM_LOGS=gcp`, or
65
- - `K_SERVICE` is set (e.g. Cloud Run)
63
+ - **GCP backend** is used when `GCP_PROJECT` is set.
66
64
  - Otherwise, the **console backend** is used.
67
65
 
68
66
  ### Severity methods
@@ -99,15 +97,12 @@ logger.info("request complete", { method: "GET", path: "/api/users", status: 200
99
97
 
100
98
  ### Environment variables
101
99
 
102
- - `SYSTEM_LOGS=gcp`
103
- Force GCP logging even if `K_SERVICE` is not set.
100
+ - `GCP_PROJECT`
101
+ Project ID for Google Cloud Logging. When set, the GCP backend is used.
104
102
 
105
103
  - `K_SERVICE`
106
104
  Used as the log name in Google Cloud Logging. If not set, `"app"` is used.
107
105
 
108
- - `GCP_PROJECT`
109
- Project ID for Google Cloud Logging. Required when using the GCP backend.
110
-
111
106
  ### Named exports
112
107
 
113
108
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logickernel/logger",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",