@bsb/observable-winston 9.0.0 → 9.0.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.
Files changed (2) hide show
  1. package/README.md +47 -14
  2. package/package.json +7 -4
package/README.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # @bsb/observable-winston
2
2
 
3
- Winston observable plugin for BSB - integrate with the popular Winston logging framework.
3
+ Winston observable plugin for BSB that integrates with the Winston logging framework.
4
+
5
+ ## Key Features
6
+
7
+ - Full Winston ecosystem support with child loggers
8
+ - Multiple transports: console, file, daily-rotate-file
9
+ - Flexible formatting: JSON, pretty-print, or simple text
10
+ - Per-plugin child loggers for isolated logging
11
+ - Proper error serialization with stack traces
4
12
 
5
13
  ## Installation
6
14
 
@@ -8,16 +16,10 @@ Winston observable plugin for BSB - integrate with the popular Winston logging f
8
16
  npm install @bsb/observable-winston
9
17
  ```
10
18
 
11
- ## Features
12
-
13
- - **Winston integration** - Full Winston ecosystem support
14
- - **Multiple transports** - Console, file, daily-rotate-file
15
- - **Flexible formatting** - JSON, pretty-print, or simple text
16
- - **Child loggers** - Per-plugin Winston loggers
17
- - **Error serialization** - Proper error stack trace handling
18
-
19
19
  ## Configuration
20
20
 
21
+ Add the plugin to your BSB configuration file:
22
+
21
23
  ```yaml
22
24
  plugins:
23
25
  observables:
@@ -51,11 +53,42 @@ plugins:
51
53
 
52
54
  ### Configuration Options
53
55
 
54
- - **level**: Minimum log level ("error", "warn", "info", "debug")
55
- - **transports.console**: Console output settings
56
- - **transports.file**: Standard file output
57
- - **transports.dailyRotate**: Daily rotating files with retention
58
- - **format**: Timestamp, JSON, and pretty-print options
56
+ | Option | Description | Default |
57
+ |--------|-------------|---------|
58
+ | `level` | Minimum log level: `error`, `warn`, `info`, `debug` | `info` |
59
+ | `transports.console` | Console output settings | Enabled |
60
+ | `transports.file` | Standard file output with size-based rotation | Disabled |
61
+ | `transports.dailyRotate` | Daily rotating files with retention | Disabled |
62
+ | `format.timestamp` | Include timestamps in logs | `true` |
63
+ | `format.json` | Output in JSON format | `true` |
64
+ | `format.prettyPrint` | Pretty-print JSON output | `false` |
65
+
66
+ ## Usage
67
+
68
+ Once configured, logs are handled by Winston automatically:
69
+
70
+ ```typescript
71
+ this.log.info("Service initialized");
72
+ this.log.error("Error occurred", new Error("Something went wrong"));
73
+ ```
74
+
75
+ ## Daily Rotation Output
76
+
77
+ ```text
78
+ logs/
79
+ application-2026-02-04.log
80
+ application-2026-02-03.log.gz
81
+ application-2026-02-02.log.gz
82
+ ```
83
+
84
+ ## Documentation
85
+
86
+ Detailed documentation (used by the BSB Registry): `https://github.com/BetterCorp/better-service-base/blob/master/plugins/nodejs/observable-winston/docs/plugin.md`
87
+
88
+ ## Links
89
+
90
+ - GitHub: `https://github.com/BetterCorp/better-service-base/tree/master/plugins/nodejs/observable-winston`
91
+ - BSB Registry (package): `https://io.bsbcode.dev/packages/nodejs/@bsb/observable-winston`
59
92
 
60
93
  ## License
61
94
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@bsb/observable-winston",
3
- "version": "9.0.0",
3
+ "version": "9.0.1",
4
4
  "license": "(AGPL-3.0-only OR Commercial)",
5
5
  "author": {
6
6
  "name": "BetterCorp (PTY) Ltd",
7
- "email": "nick@bettercorp.dev",
7
+ "email": "ninja@bettercorp.dev",
8
8
  "url": "https://bettercorp.dev/"
9
9
  },
10
10
  "description": "Winston observable plugin for BSB - integrate with Winston logger framework",
@@ -53,6 +53,9 @@
53
53
  "node": ">=23.0.0",
54
54
  "npm": ">=11.0.0"
55
55
  },
56
- "homepage": "https://io.bsbcode.dev/plugins/bsb/observable-winston"
56
+ "homepage": "https://io.bsbcode.dev/packages/nodejs/@bsb/observable-winston"
57
57
  }
58
-
58
+
59
+
60
+
61
+