@celljs/logger 4.3.0 → 4.4.1
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/README.md +15 -2
- package/cell.schema.json +16 -0
- package/package.json +3 -3
- package/cell.yml +0 -1
package/README.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Cell - Logger Component with winston
|
|
2
2
|
|
|
3
|
-
Replaces the default `Logger` of `@celljs/core` with one backed by [winston](https://github.com/winstonjs/winston).
|
|
3
|
+
Replaces the default console `Logger` of `@celljs/core` with one backed by [winston](https://github.com/winstonjs/winston).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```bash
|
|
6
|
+
npm install @celljs/logger
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Nothing else changes in your code: components keep injecting `@Autowired(Logger)`.
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
logger:
|
|
13
|
+
level: debug # default info
|
|
14
|
+
winstonConfig: # merged into the winston options
|
|
15
|
+
defaultMeta: { service: my-app }
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The level comes from `logger.level` (default `info`); `logger.winstonConfig` is merged into the winston options. The per-request access log of `@celljs/web` is written at `debug`, so it is not printed by default; set `logger.level: debug` (or `CELL_LOGGER__LEVEL=debug`) to see it.
|
package/cell.schema.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"properties": {
|
|
4
|
+
"logger": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"description": "Logging.",
|
|
7
|
+
"properties": {
|
|
8
|
+
"winstonConfig": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"description": "Options of the winston logger (format, transports...).",
|
|
11
|
+
"additionalProperties": true
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/logger",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"description": "logger component for pino",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cell-component"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"lib",
|
|
24
24
|
"esm",
|
|
25
25
|
"src",
|
|
26
|
-
"cell.
|
|
26
|
+
"cell.schema.json"
|
|
27
27
|
],
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build": "tsc -b && bun ../../scripts/build-esm.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@celljs/core": "4.
|
|
35
|
+
"@celljs/core": "4.4.1",
|
|
36
36
|
"winston": "^3.10.0"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
package/cell.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|