Skip to content

Commit ead0405

Browse files
committed
Fix typos
1 parent 9f798a6 commit ead0405

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -379,18 +379,18 @@ grandchildLogger.silly("grandchild1 message");
379379
#### Attach additional transports
380380

381381
`tslog` focuses on the one thing it does well: capturing logs.
382-
Therefore, there is no build-in _file system_ logging, _log rotation_, or similar.
382+
Therefore, there is no built-in _file system_ logging, _log rotation_, or similar.
383383
Per default all logs go to `console`, which can be overwritten (s. below).
384384

385385
However, you can easily attach as many _transports_ as you wish, enabling you to do fancy stuff
386386
like sending messages to _Slack_ or _Telegram_ in case of an urgent error or forwarding them to a log aggregator service.
387387

388-
**Attached transports are also inherited to child loggers.**
388+
**Attached transports are also inherited by sub-loggers.**
389389

390390
##### Simple transport example
391391

392392
Here is a very simple implementation used in our _jest_ tests.
393-
This example with suppress logs from being send to `console` (`type: "hidden"`) and will instead collect them in an `array`.
393+
This example will suppress logs from being sent to `console` (`type: "hidden"`) and will instead collect them in an `array`.
394394

395395
```typescript
396396
const transports: any[] = [];
@@ -405,7 +405,7 @@ const logMsg = logger.info("Log message");
405405

406406
##### Storing logs in a file
407407

408-
Here is an example how to store all logs in a file.
408+
Here is an example of how to store all logs in a file.
409409

410410
```typescript
411411
import { Logger } from "tslog";
@@ -422,7 +422,7 @@ logger.warn("I am a warn log with a json object:", { foo: "bar" });
422422

423423
```
424424

425-
##### Storing logs in file system with rotating files
425+
##### Storing logs in a file system with rotating files
426426

427427
If you want to limit the file size of the stored logs, a good practice is to use file rotation, where old logs will be deleted automatically.
428428
There is a great library called `rotating-file-stream` solving this problem for us and even adding features like compression, file size limit etc.
@@ -554,9 +554,9 @@ const logMsg = logger.info("Test");
554554
**❗ Keep track of all subsequent calls and promises originated from a single request (e.g. HTTP).**
555555

556556
In a real world application a call to an API would lead to many logs produced across the entire application.
557-
When debugging it can get quite handy to be able to group all logs based by a unique identifier, e.g. `requestId`.
557+
When debugging it can be quite handy to be able to group all logs based on a unique identifier, e.g. `requestId`.
558558

559-
Some provides (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>.
559+
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>.
560560

561561
**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.**
562562

docs/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -379,18 +379,18 @@ grandchildLogger.silly("grandchild1 message");
379379
#### Attach additional transports
380380

381381
`tslog` focuses on the one thing it does well: capturing logs.
382-
Therefore, there is no build-in _file system_ logging, _log rotation_, or similar.
382+
Therefore, there is no built-in _file system_ logging, _log rotation_, or similar.
383383
Per default all logs go to `console`, which can be overwritten (s. below).
384384

385385
However, you can easily attach as many _transports_ as you wish, enabling you to do fancy stuff
386386
like sending messages to _Slack_ or _Telegram_ in case of an urgent error or forwarding them to a log aggregator service.
387387

388-
**Attached transports are also inherited to child loggers.**
388+
**Attached transports are also inherited by sub-loggers.**
389389

390390
##### Simple transport example
391391

392392
Here is a very simple implementation used in our _jest_ tests.
393-
This example with suppress logs from being send to `console` (`type: "hidden"`) and will instead collect them in an `array`.
393+
This example will suppress logs from being sent to `console` (`type: "hidden"`) and will instead collect them in an `array`.
394394

395395
```typescript
396396
const transports: any[] = [];
@@ -405,7 +405,7 @@ const logMsg = logger.info("Log message");
405405

406406
##### Storing logs in a file
407407

408-
Here is an example how to store all logs in a file.
408+
Here is an example of how to store all logs in a file.
409409

410410
```typescript
411411
import { Logger } from "tslog";
@@ -422,7 +422,7 @@ logger.warn("I am a warn log with a json object:", { foo: "bar" });
422422

423423
```
424424

425-
##### Storing logs in file system with rotating files
425+
##### Storing logs in a file system with rotating files
426426

427427
If you want to limit the file size of the stored logs, a good practice is to use file rotation, where old logs will be deleted automatically.
428428
There is a great library called `rotating-file-stream` solving this problem for us and even adding features like compression, file size limit etc.
@@ -554,9 +554,9 @@ const logMsg = logger.info("Test");
554554
**❗ Keep track of all subsequent calls and promises originated from a single request (e.g. HTTP).**
555555

556556
In a real world application a call to an API would lead to many logs produced across the entire application.
557-
When debugging it can get quite handy to be able to group all logs based by a unique identifier, e.g. `requestId`.
557+
When debugging it can be quite handy to be able to group all logs based on a unique identifier, e.g. `requestId`.
558558

559-
Some provides (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>.
559+
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>.
560560

561561
**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.**
562562

0 commit comments

Comments
 (0)