standard-log 11.2.2 → 11.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.
- package/README.md +9 -19
- package/dist/standard-log.es5.js +192 -170
- package/dist/standard-log.es5.js.gz +0 -0
- package/dist/standard-log.es5.js.map +1 -1
- package/dist/standard-log.es5.js.map.gz +0 -0
- package/dist/standard-log.esm.js +11 -14
- package/dist/standard-log.esm.js.gz +0 -0
- package/dist/standard-log.esm.js.map +1 -1
- package/dist/standard-log.esm.js.map.gz +0 -0
- package/package.json +4 -4
- package/cjs/testUtil.d.ts +0 -10
- package/cjs/testUtil.d.ts.map +0 -1
- package/cjs/testUtil.js +0 -25
- package/cjs/testUtil.js.map +0 -1
- package/esm/console.spec.d.ts +0 -2
- package/esm/console.spec.d.ts.map +0 -1
- package/esm/console.spec.js +0 -159
- package/esm/console.spec.js.map +0 -1
- package/esm/formatter.spec.d.ts +0 -2
- package/esm/formatter.spec.d.ts.map +0 -1
- package/esm/formatter.spec.js +0 -30
- package/esm/formatter.spec.js.map +0 -1
- package/esm/index.spec.d.ts +0 -2
- package/esm/index.spec.d.ts.map +0 -1
- package/esm/index.spec.js +0 -13
- package/esm/index.spec.js.map +0 -1
- package/esm/logLevels.spec.d.ts +0 -2
- package/esm/logLevels.spec.d.ts.map +0 -1
- package/esm/logLevels.spec.js +0 -8
- package/esm/logLevels.spec.js.map +0 -1
- package/esm/logStore.spec.d.ts +0 -2
- package/esm/logStore.spec.d.ts.map +0 -1
- package/esm/logStore.spec.js +0 -93
- package/esm/logStore.spec.js.map +0 -1
- package/esm/memory.spec.d.ts +0 -2
- package/esm/memory.spec.d.ts.map +0 -1
- package/esm/memory.spec.js +0 -144
- package/esm/memory.spec.js.map +0 -1
- package/esm/standardLog.spec.d.ts +0 -2
- package/esm/standardLog.spec.d.ts.map +0 -1
- package/esm/standardLog.spec.js +0 -576
- package/esm/standardLog.spec.js.map +0 -1
- package/esm/testUtil.d.ts +0 -10
- package/esm/testUtil.d.ts.map +0 -1
- package/esm/testUtil.js +0 -18
- package/esm/testUtil.js.map +0 -1
- package/esm/types.spec.d.ts +0 -2
- package/esm/types.spec.d.ts.map +0 -1
- package/esm/types.spec.js +0 -5
- package/esm/types.spec.js.map +0 -1
package/README.md
CHANGED
|
@@ -8,19 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
[![Visual Studio Code][vscode-image]][vscode-url]
|
|
10
10
|
|
|
11
|
-
[
|
|
12
|
-
|
|
13
|
-
## New in 9.0
|
|
14
|
-
|
|
15
|
-
[`standard-log`] 9.0 is a trimmed down version that focus more on security and support the micro-app paradigm.
|
|
16
|
-
|
|
17
|
-
The key changes are:
|
|
18
|
-
|
|
19
|
-
- Side effects free: application calling `createStandardLog()` gets a completely enclosed log system.
|
|
20
|
-
- Immutable: after the log system can be configured when calling `createStandardLog()`.\
|
|
21
|
-
But after that, the system is immutable and cannot be changed.\
|
|
22
|
-
|
|
23
|
-
For the full list of changes, please check the [change log](./CHANGELOG.md).
|
|
11
|
+
[standard-log] is a powerful and extensible logging library.
|
|
24
12
|
|
|
25
13
|
## Key features
|
|
26
14
|
|
|
@@ -35,7 +23,7 @@ For the full list of changes, please check the [change log](./CHANGELOG.md).
|
|
|
35
23
|
|
|
36
24
|
## Usage
|
|
37
25
|
|
|
38
|
-
There are two ways to use [
|
|
26
|
+
There are two ways to use [standard-log]: global or standalone.
|
|
39
27
|
|
|
40
28
|
Standalone is the preferred way.
|
|
41
29
|
You call `createStandardLog()` to get an isolated log system.
|
|
@@ -55,7 +43,7 @@ log.info('info message')
|
|
|
55
43
|
log.debug('debug message')
|
|
56
44
|
```
|
|
57
45
|
|
|
58
|
-
![Rendering example]
|
|
46
|
+
![Rendering example][rendering-example]
|
|
59
47
|
|
|
60
48
|
(above is logged with `standard-log-color`)
|
|
61
49
|
|
|
@@ -133,9 +121,9 @@ createConsoleLogReporter({
|
|
|
133
121
|
|
|
134
122
|
Here are some additional reporters:
|
|
135
123
|
|
|
136
|
-
- [
|
|
124
|
+
- [standard-log-color]
|
|
137
125
|
- `standard-log-file` (TODO)
|
|
138
|
-
-
|
|
126
|
+
- [standard-log-syslog]
|
|
139
127
|
|
|
140
128
|
### Suppress log
|
|
141
129
|
|
|
@@ -197,8 +185,6 @@ But in micro-app situation, the library can be shared, and each application can
|
|
|
197
185
|
In general, using this global instance should be avoided.
|
|
198
186
|
It is the main driving force for 9.0.
|
|
199
187
|
|
|
200
|
-
[`standard-log-color`]: https://github.com/unional/standard-log/tree/master/packages/color
|
|
201
|
-
[`standard-log`]: https://github.com/unional/standard-log
|
|
202
188
|
[codecov-image]: https://codecov.io/gh/unional/standard-log/branch/master/graph/badge.svg
|
|
203
189
|
[codecov-url]: https://codecov.io/gh/unional/standard-log
|
|
204
190
|
[downloads-image]: https://img.shields.io/npm/dm/standard-log.svg?style=flat
|
|
@@ -207,5 +193,9 @@ It is the main driving force for 9.0.
|
|
|
207
193
|
[github-nodejs]: https://github.com/unional/standard-log/workflows/release/badge.svg
|
|
208
194
|
[npm-image]: https://img.shields.io/npm/v/standard-log.svg?style=flat
|
|
209
195
|
[npm-url]: https://www.npmjs.com/package/standard-log
|
|
196
|
+
[rendering-example]: https://github.com/unional/standard-log/tree/main/images/color-log.png
|
|
197
|
+
[standard-log-color]: https://github.com/unional/standard-log/tree/master/packages/color
|
|
198
|
+
[standard-log-syslog]: https://github.com/unional/standard-log/tree/master/packages/syslog
|
|
199
|
+
[standard-log]: https://github.com/unional/standard-log
|
|
210
200
|
[vscode-image]: https://img.shields.io/badge/vscode-ready-green.svg
|
|
211
201
|
[vscode-url]: https://code.visualstudio.com/
|