Skip to content

Commit 8007de2

Browse files
committed
Update readme
1 parent 6488c5f commit 8007de2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
🦸 **Custom pluggable loggers**<br>
2828
💅 **Object and error interpolation**<br>
2929
🤓 **Stack trace and pretty errors**<br>
30-
👨‍👧‍👦 **Sub logger with inheritance**<br>
30+
👨‍👧‍👦 **Sub-logger with inheritance**<br>
3131
🙊 **Mask/hide secrets and keys**<br>
3232
📦 **CJS & ESM with tree shaking support**<br>
3333
✍️ **Well documented and tested**<br>
@@ -181,7 +181,7 @@ logger.fatal(new Error("I am a pretty Error with a stacktrace."));
181181
- **Object/JSON highlighting:** Nicely prints out objects
182182
- **Instance Name**: _(Server-side only)_ Logs capture instance name (default host name) making it easy to distinguish logs coming from different instances
183183
- **Named Logger:** Logger can be named (e.g. useful for packages/modules and monorepos)
184-
- **Sub Logger with inheritance:** Powerful sub-loggers with settings inheritance, also at runtime
184+
- **Sub-logger with inheritance:** Powerful sub-loggers with settings inheritance, also at runtime
185185
- **Secrets masking:** Prevent passwords and secrets from sneaking into log files by masking them
186186
- **Short paths:** Paths are relative to the root of the application folder
187187
- **Prefixes:** Prefix log messages and bequeath prefixes to child loggers
@@ -309,7 +309,7 @@ const hiddenLogger = new Logger({type: "hidden"});
309309

310310
Each logger has an optional name.
311311
You can find the name of the logger responsible for a log inside the `Meta`-object or printed in `pretty` mode.
312-
Names get also inherited to sub loggers and can be found inside the `Meta`-object `parentNames` as well as printed out with a separator (e.g. `:`) in `pretty` mode.
312+
Names get also inherited to sub-loggers and can be found inside the `Meta`-object `parentNames` as well as printed out with a separator (e.g. `:`) in `pretty` mode.
313313

314314
Simple name example:
315315
```typescript
@@ -462,7 +462,7 @@ There are multiple ways of masking secrets, before they get exposed:
462462

463463
#### Prefixing logs
464464
Prefix every log message with an array of additional attributes.<br>
465-
Prefixes propagate to sub loggers and can help to follow a chain of promises.<br>
465+
Prefixes propagate to sub-loggers and can help to follow a chain of promises.<br>
466466
In addition to <a href="https://nodejs.org/api/async_hooks.html#async_hooks_class_asynclocalstorage" target="_blank">`AsyncLocalStorage`</a>, prefixes can help further distinguish different parts of a request.
467467

468468
> **Hint:** A good example could be a GraphQL request, that by design could consist of multiple queries and/or mutations.
@@ -679,7 +679,7 @@ When debugging it can be quite handy to be able to group all logs based on a uni
679679

680680
Some providers (e.g. `Heroku`) already set a `X-Request-ID` header, which we are going to use or fallback to a short ID generated by <a href="https://www.npmjs.com/package/nanoid" target="_blank">`nanoid`</a>.
681681

682-
**In this example every subsequent logger is a sub logger of the main logger and thus inherits all of its settings making `requestId` available throughout the entire application without any further ado.**
682+
**In this example every subsequent logger is a sub-logger of the main logger and thus inherits all of its settings making `requestId` available throughout the entire application without any further ado.**
683683

684684
`tslog` works with any API framework (like `Express`, `Koa`, `Hapi` and so on), but in this example we are using `Koa`.
685685
```typescript
@@ -722,7 +722,7 @@ Some providers (e.g. `Heroku`) already set a `X-Request-ID` header, which we are
722722
// log request
723723
logger.silly({ originalUrl: ctx.originalUrl, status: ctx.response.status, message: ctx.response.message });
724724

725-
// also works with a sub logger
725+
// also works with a sub-logger
726726
const subLogger = logger.getSubLogger();
727727
subLogger.info("Log containing requestId"); // <-- will contain a requestId
728728

0 commit comments

Comments
 (0)