Skip to content

Commit 38864a1

Browse files
committed
Merge branch 'development'
2 parents 4b3810d + 8796b57 commit 38864a1

File tree

10 files changed

+804
-2248
lines changed

10 files changed

+804
-2248
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12
1+
14

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
👨‍👧‍👦 **Child logger with inheritance**<br>
2828
🙊 **Mask/hide secrets and keys**<br>
2929
🔍 **Native support for request IDs (<a href="https://nodejs.org/api/async_hooks.html#async_hooks_async_hooks" target="_blank">`async_hooks`</a>, <a href="https://nodejs.org/api/async_hooks.html#async_hooks_class_asynclocalstorage" target="_blank">`AsyncLocalStorage`</a>)**<br>
30-
🌳 **Tree shaking support**<br>
30+
📦 **CommonJS and ES Modules support with tree shaking support**<br>
3131
🧲 **Optionally catch all `console` logs**<br>
3232
✍️ **well documented**<br>
3333

@@ -55,11 +55,15 @@ This feature enables `tslog` to reference a correct line number in your TypeScri
5555
// ...
5656
"compilerOptions": {
5757
// ...
58-
"sourceMap": true
58+
"sourceMap": true,
59+
// we recommend using an current ES version
60+
"target": "es2019",
5961
}
6062
}
6163
```
6264

65+
66+
6367
### Simple example
6468

6569
```typescript
@@ -85,7 +89,8 @@ log.fatal(new Error("I am a pretty Error with a stacktrace."));
8589
* **Fully typed:** Written in TypeScript, fully typed, API checked with <a href="https://api-extractor.com" target="_blank">_api-extractor_</a>, <a href="https://github.com/microsoft/tsdoc" target="_blank">_TSDoc_</a> documented
8690
* **Source maps lookup:** Shows exact position also in TypeScript code (compile-to-JS), one click to IDE position
8791
* **Stack trace:** Callsites through native <a href="https://v8.dev/docs/stack-trace-api" target="_blank">_V8 stack trace API_</a>, excludes internal entries
88-
* **Tree shake suport** via esm import syntax ([tree-shaking](https://webpack.js.org/guides/tree-shaking/))
92+
* **CommonJS and ES Modules**<br>
93+
* **Tree shake support** via ESM import syntax ([tree-shaking](https://webpack.js.org/guides/tree-shaking/))
8994
* **Pretty Error:** Errors and stack traces printed in a structured way and fully accessible through _JSON_ (e.g. external Log services)
9095
* **Code frame:** `tslog` captures and displays the source code that lead to an error, making it easier to debug
9196
* **Object/JSON highlighting:** Nicely prints out an object using native Node.js `utils.inspect` method
@@ -513,6 +518,10 @@ This setting allows you to overwrite the default colors of `tslog` used for the
513518

514519
More Details: <a href="https://nodejs.org/api/util.html#util_customizing_util_inspect_colors" target="_blank">Customizing util.inspect colors</a>
515520

521+
##### `delimiter`
522+
```default: [ ] (space)```
523+
Set a custom pretty log delimiter.
524+
516525
##### `dateTimePattern`
517526
```default: "year-month-day hour:minute:second.millisecond"```
518527

0 commit comments

Comments
 (0)