@travetto/log 5.0.0-rc.9 → 5.0.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 +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ npm install @travetto/log
|
|
|
13
13
|
yarn add @travetto/log
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
This module provides logging functionality, building upon [ConsoleManager](https://github.com/travetto/travetto/tree/main/module/runtime/src/console.ts) in the [
|
|
16
|
+
This module provides logging functionality, building upon [ConsoleManager](https://github.com/travetto/travetto/tree/main/module/runtime/src/console.ts) in the [Runtime](https://github.com/travetto/travetto/tree/main/module/runtime#readme "Runtime for travetto applications.") module. This is all ultimately built upon [console](https://nodejs.org/api/console.html) operations. The logging infrastructure is built upon the [Dependency Injection](https://github.com/travetto/travetto/tree/main/module/di#readme "Dependency registration/management and injection support.") system, and so new loggers can be created that rely upon dependency injected services and sources.
|
|
17
17
|
|
|
18
18
|
## Extending the Common Logger
|
|
19
19
|
By default, the system ships with the [CommonLogger](https://github.com/travetto/travetto/tree/main/module/log/src/common.ts#L12), and by default will leverage the [LineLogFormatter](https://github.com/travetto/travetto/tree/main/module/log/src/formatter/line.ts#L37) and the [ConsoleLogAppender](https://github.com/travetto/travetto/tree/main/module/log/src/appender/console.ts#L7). The configuration [CommonLoggerConfig](https://github.com/travetto/travetto/tree/main/module/log/src/common.ts#L12) provides two configuration variables that allows for switching out [LineLogFormatter](https://github.com/travetto/travetto/tree/main/module/log/src/formatter/line.ts#L37) for the [JsonLogFormatter](https://github.com/travetto/travetto/tree/main/module/log/src/formatter/json.ts#L16), depending on the value of `CommonLoggerConfig.format`. Additionally the [ConsoleLogAppender](https://github.com/travetto/travetto/tree/main/module/log/src/appender/console.ts#L7) can be swapped out for the [FileLogAppender](https://github.com/travetto/travetto/tree/main/module/log/src/appender/file.ts#L11) depending on the value of `CommonLoggerConfig.output`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/log",
|
|
3
|
-
"version": "5.0.0
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Logging framework that integrates at the console.log level.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"directory": "module/log"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@travetto/config": "^5.0.0
|
|
27
|
-
"@travetto/di": "^5.0.0
|
|
28
|
-
"@travetto/terminal": "^5.0.0
|
|
26
|
+
"@travetto/config": "^5.0.0",
|
|
27
|
+
"@travetto/di": "^5.0.0",
|
|
28
|
+
"@travetto/terminal": "^5.0.0"
|
|
29
29
|
},
|
|
30
30
|
"travetto": {
|
|
31
31
|
"displayName": "Logging"
|